blob: ff787e90b09df53f3bfd2a860f08396309062fc2 [file] [log] [blame]
Andrey Andreev7d4ea072011-12-25 19:23:50 +02001<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Greg Akerbde25d92010-12-21 09:31:21 -06002/**
3 * CodeIgniter
4 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05005 * An open source application development framework for PHP 5.1.6 or newer
6 *
7 * NOTICE OF LICENSE
Andrey Andreev7d4ea072011-12-25 19:23:50 +02008 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -05009 * Licensed under the Open Software License version 3.0
Andrey Andreev7d4ea072011-12-25 19:23:50 +020010 *
Derek Jonesf4a4bd82011-10-20 12:18:42 -050011 * 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 Akerbde25d92010-12-21 09:31:21 -060018 *
19 * @package CodeIgniter
Derek Jonesf4a4bd82011-10-20 12:18:42 -050020 * @author EllisLab Dev Team
Derek Jones700205a2011-01-28 07:44:28 -060021 * @copyright Copyright (c) 2006 - 2011 EllisLab, Inc.
Derek Jonesf4a4bd82011-10-20 12:18:42 -050022 * @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
Greg Akerbde25d92010-12-21 09:31:21 -060023 * @link http://codeigniter.com
24 * @since Version 2.0
Eric Barnesbffb7762011-04-18 00:03:31 -040025 * @filesource
Greg Akerbde25d92010-12-21 09:31:21 -060026 */
27
28// ------------------------------------------------------------------------
29
30/**
Eric Barnesbffb7762011-04-18 00:03:31 -040031 * CodeIgniter Dummy Caching Class
Greg Akerbde25d92010-12-21 09:31:21 -060032 *
33 * @package CodeIgniter
34 * @subpackage Libraries
35 * @category Core
Derek Jonesf4a4bd82011-10-20 12:18:42 -050036 * @author EllisLab Dev Team
Eric Barnesbffb7762011-04-18 00:03:31 -040037 * @link
Greg Akerbde25d92010-12-21 09:31:21 -060038 */
39
Phil Sturgeoneb2dcda2011-04-02 14:44:58 +010040class CI_Cache_dummy extends CI_Driver {
Greg Akerbde25d92010-12-21 09:31:21 -060041
42 /**
Eric Barnesbffb7762011-04-18 00:03:31 -040043 * Get
Greg Akerbde25d92010-12-21 09:31:21 -060044 *
45 * Since this is the dummy class, it's always going to return FALSE.
46 *
Eric Barnesbffb7762011-04-18 00:03:31 -040047 * @param string
Greg Akerbde25d92010-12-21 09:31:21 -060048 * @return Boolean FALSE
49 */
50 public function get($id)
51 {
52 return FALSE;
53 }
54
Eric Barnesbffb7762011-04-18 00:03:31 -040055 // ------------------------------------------------------------------------
56
Greg Akerbde25d92010-12-21 09:31:21 -060057 /**
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 Barnesbffb7762011-04-18 00:03:31 -040070
Greg Akerbde25d92010-12-21 09:31:21 -060071 // ------------------------------------------------------------------------
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 Barnesbffb7762011-04-18 00:03:31 -0400127 *
Greg Akerbde25d92010-12-21 09:31:21 -0600128 * @return TRUE;
129 */
130 public function is_supported()
131 {
132 return TRUE;
133 }
134
135 // ------------------------------------------------------------------------
Eric Barnesbffb7762011-04-18 00:03:31 -0400136
Greg Akerbde25d92010-12-21 09:31:21 -0600137}
138// End Class
139
Eric Barnesbffb7762011-04-18 00:03:31 -0400140/* End of file Cache_dummy.php */
Andrey Andreev7d4ea072011-12-25 19:23:50 +0200141/* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */