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