Andrey Andreev | c5536aa | 2012-11-01 17:33:58 +0200 | [diff] [blame^] | 1 | <?php |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
Phil Sturgeon | 07c1ac8 | 2012-03-09 17:03:37 +0000 | [diff] [blame] | 5 | * An open source application development framework for PHP 5.2.4 or newer |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 6 | * |
| 7 | * NOTICE OF LICENSE |
Andrey Andreev | 7d4ea07 | 2011-12-25 19:23:50 +0200 | [diff] [blame] | 8 | * |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 9 | * Licensed under the Open Software License version 3.0 |
Andrey Andreev | 7d4ea07 | 2011-12-25 19:23:50 +0200 | [diff] [blame] | 10 | * |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 11 | * This source file is subject to the Open Software License (OSL 3.0) that is |
| 12 | * bundled with this package in the files license.txt / license.rst. It is |
| 13 | * also available through the world wide web at this URL: |
| 14 | * http://opensource.org/licenses/OSL-3.0 |
| 15 | * If you did not receive a copy of the license and are unable to obtain it |
| 16 | * through the world wide web, please send an email to |
| 17 | * licensing@ellislab.com so we can send you a copy immediately. |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 18 | * |
| 19 | * @package CodeIgniter |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 20 | * @author EllisLab Dev Team |
Andrey Andreev | c5536aa | 2012-11-01 17:33:58 +0200 | [diff] [blame^] | 21 | * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/) |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 22 | * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 23 | * @link http://codeigniter.com |
| 24 | * @since Version 2.0 |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 25 | * @filesource |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 26 | */ |
Andrey Andreev | c5536aa | 2012-11-01 17:33:58 +0200 | [diff] [blame^] | 27 | defined('BASEPATH') OR exit('No direct script access allowed'); |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 28 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 29 | /** |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 30 | * CodeIgniter Dummy Caching Class |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 31 | * |
| 32 | * @package CodeIgniter |
| 33 | * @subpackage Libraries |
| 34 | * @category Core |
Derek Jones | f4a4bd8 | 2011-10-20 12:18:42 -0500 | [diff] [blame] | 35 | * @author EllisLab Dev Team |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 36 | * @link |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 37 | */ |
Phil Sturgeon | eb2dcda | 2011-04-02 14:44:58 +0100 | [diff] [blame] | 38 | class CI_Cache_dummy extends CI_Driver { |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 39 | |
| 40 | /** |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 41 | * Get |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 42 | * |
| 43 | * Since this is the dummy class, it's always going to return FALSE. |
| 44 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 45 | * @param string |
| 46 | * @return bool FALSE |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 47 | */ |
| 48 | public function get($id) |
| 49 | { |
| 50 | return FALSE; |
| 51 | } |
| 52 | |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 53 | // ------------------------------------------------------------------------ |
| 54 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 55 | /** |
| 56 | * Cache Save |
| 57 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 58 | * @param string Unique Key |
| 59 | * @param mixed Data to store |
| 60 | * @param int Length of time (in seconds) to cache the data |
| 61 | * @return bool TRUE, Simulating success |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 62 | */ |
| 63 | public function save($id, $data, $ttl = 60) |
| 64 | { |
| 65 | return TRUE; |
| 66 | } |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 67 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 68 | // ------------------------------------------------------------------------ |
| 69 | |
| 70 | /** |
| 71 | * Delete from Cache |
| 72 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 73 | * @param mixed unique identifier of the item in the cache |
Timothy Warren | 0688ac9 | 2012-04-20 10:25:04 -0400 | [diff] [blame] | 74 | * @return bool TRUE, simulating success |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 75 | */ |
| 76 | public function delete($id) |
| 77 | { |
| 78 | return TRUE; |
| 79 | } |
| 80 | |
| 81 | // ------------------------------------------------------------------------ |
| 82 | |
| 83 | /** |
| 84 | * Clean the cache |
| 85 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 86 | * @return bool TRUE, simulating success |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 87 | */ |
| 88 | public function clean() |
| 89 | { |
| 90 | return TRUE; |
| 91 | } |
| 92 | |
| 93 | // ------------------------------------------------------------------------ |
| 94 | |
| 95 | /** |
| 96 | * Cache Info |
| 97 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 98 | * @param string user/filehits |
| 99 | * @return bool FALSE |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 100 | */ |
| 101 | public function cache_info($type = NULL) |
| 102 | { |
| 103 | return FALSE; |
| 104 | } |
| 105 | |
| 106 | // ------------------------------------------------------------------------ |
| 107 | |
| 108 | /** |
| 109 | * Get Cache Metadata |
| 110 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 111 | * @param mixed key to get cache metadata on |
| 112 | * @return bool FALSE |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 113 | */ |
| 114 | public function get_metadata($id) |
| 115 | { |
| 116 | return FALSE; |
| 117 | } |
| 118 | |
| 119 | // ------------------------------------------------------------------------ |
| 120 | |
| 121 | /** |
| 122 | * Is this caching driver supported on the system? |
| 123 | * Of course this one is. |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 124 | * |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 125 | * @return bool TRUE |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 126 | */ |
| 127 | public function is_supported() |
| 128 | { |
| 129 | return TRUE; |
| 130 | } |
| 131 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 132 | } |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 133 | |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 134 | /* End of file Cache_dummy.php */ |
Andrey Andreev | b24b033 | 2012-03-26 15:34:39 +0300 | [diff] [blame] | 135 | /* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */ |