Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 1 | <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); |
| 2 | /** |
| 3 | * CodeIgniter |
| 4 | * |
| 5 | * An open source application development framework for PHP 4.3.2 or newer |
| 6 | * |
| 7 | * @package CodeIgniter |
| 8 | * @author ExpressionEngine Dev Team |
Derek Jones | 700205a | 2011-01-28 07:44:28 -0600 | [diff] [blame] | 9 | * @copyright Copyright (c) 2006 - 2011 EllisLab, Inc. |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 10 | * @license http://codeigniter.com/user_guide/license.html |
| 11 | * @link http://codeigniter.com |
| 12 | * @since Version 2.0 |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 13 | * @filesource |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 14 | */ |
| 15 | |
| 16 | // ------------------------------------------------------------------------ |
| 17 | |
| 18 | /** |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 19 | * CodeIgniter Dummy Caching Class |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 20 | * |
| 21 | * @package CodeIgniter |
| 22 | * @subpackage Libraries |
| 23 | * @category Core |
| 24 | * @author ExpressionEngine Dev Team |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 25 | * @link |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 26 | */ |
| 27 | |
Phil Sturgeon | eb2dcda | 2011-04-02 14:44:58 +0100 | [diff] [blame] | 28 | class CI_Cache_dummy extends CI_Driver { |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 29 | |
| 30 | /** |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 31 | * Get |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 32 | * |
| 33 | * Since this is the dummy class, it's always going to return FALSE. |
| 34 | * |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 35 | * @param string |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 36 | * @return Boolean FALSE |
| 37 | */ |
| 38 | public function get($id) |
| 39 | { |
| 40 | return FALSE; |
| 41 | } |
| 42 | |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 43 | // ------------------------------------------------------------------------ |
| 44 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 45 | /** |
| 46 | * Cache Save |
| 47 | * |
| 48 | * @param string Unique Key |
| 49 | * @param mixed Data to store |
| 50 | * @param int Length of time (in seconds) to cache the data |
| 51 | * |
| 52 | * @return boolean TRUE, Simulating success |
| 53 | */ |
| 54 | public function save($id, $data, $ttl = 60) |
| 55 | { |
| 56 | return TRUE; |
| 57 | } |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 58 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 59 | // ------------------------------------------------------------------------ |
| 60 | |
| 61 | /** |
| 62 | * Delete from Cache |
| 63 | * |
| 64 | * @param mixed unique identifier of the item in the cache |
| 65 | * @param boolean TRUE, simulating success |
| 66 | */ |
| 67 | public function delete($id) |
| 68 | { |
| 69 | return TRUE; |
| 70 | } |
| 71 | |
| 72 | // ------------------------------------------------------------------------ |
| 73 | |
| 74 | /** |
| 75 | * Clean the cache |
| 76 | * |
| 77 | * @return boolean TRUE, simulating success |
| 78 | */ |
| 79 | public function clean() |
| 80 | { |
| 81 | return TRUE; |
| 82 | } |
| 83 | |
| 84 | // ------------------------------------------------------------------------ |
| 85 | |
| 86 | /** |
| 87 | * Cache Info |
| 88 | * |
| 89 | * @param string user/filehits |
| 90 | * @return boolean FALSE |
| 91 | */ |
| 92 | public function cache_info($type = NULL) |
| 93 | { |
| 94 | return FALSE; |
| 95 | } |
| 96 | |
| 97 | // ------------------------------------------------------------------------ |
| 98 | |
| 99 | /** |
| 100 | * Get Cache Metadata |
| 101 | * |
| 102 | * @param mixed key to get cache metadata on |
| 103 | * @return boolean FALSE |
| 104 | */ |
| 105 | public function get_metadata($id) |
| 106 | { |
| 107 | return FALSE; |
| 108 | } |
| 109 | |
| 110 | // ------------------------------------------------------------------------ |
| 111 | |
| 112 | /** |
| 113 | * Is this caching driver supported on the system? |
| 114 | * Of course this one is. |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 115 | * |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 116 | * @return TRUE; |
| 117 | */ |
| 118 | public function is_supported() |
| 119 | { |
| 120 | return TRUE; |
| 121 | } |
| 122 | |
| 123 | // ------------------------------------------------------------------------ |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 124 | |
Greg Aker | bde25d9 | 2010-12-21 09:31:21 -0600 | [diff] [blame] | 125 | } |
| 126 | // End Class |
| 127 | |
Eric Barnes | bffb776 | 2011-04-18 00:03:31 -0400 | [diff] [blame] | 128 | /* End of file Cache_dummy.php */ |
| 129 | /* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */ |