blob: f96a68e27c2c4da326dceddcf71ee87da8848d62 [file] [log] [blame]
Greg Akerbde25d92010-12-21 09:31:21 -06001<?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 Jones700205a2011-01-28 07:44:28 -06009 * @copyright Copyright (c) 2006 - 2011 EllisLab, Inc.
Greg Akerbde25d92010-12-21 09:31:21 -060010 * @license http://codeigniter.com/user_guide/license.html
11 * @link http://codeigniter.com
12 * @since Version 2.0
Eric Barnesbffb7762011-04-18 00:03:31 -040013 * @filesource
Greg Akerbde25d92010-12-21 09:31:21 -060014 */
15
16// ------------------------------------------------------------------------
17
18/**
Eric Barnesbffb7762011-04-18 00:03:31 -040019 * CodeIgniter Dummy Caching Class
Greg Akerbde25d92010-12-21 09:31:21 -060020 *
21 * @package CodeIgniter
22 * @subpackage Libraries
23 * @category Core
24 * @author ExpressionEngine Dev Team
Eric Barnesbffb7762011-04-18 00:03:31 -040025 * @link
Greg Akerbde25d92010-12-21 09:31:21 -060026 */
27
Phil Sturgeoneb2dcda2011-04-02 14:44:58 +010028class CI_Cache_dummy extends CI_Driver {
Greg Akerbde25d92010-12-21 09:31:21 -060029
30 /**
Eric Barnesbffb7762011-04-18 00:03:31 -040031 * Get
Greg Akerbde25d92010-12-21 09:31:21 -060032 *
33 * Since this is the dummy class, it's always going to return FALSE.
34 *
Eric Barnesbffb7762011-04-18 00:03:31 -040035 * @param string
Greg Akerbde25d92010-12-21 09:31:21 -060036 * @return Boolean FALSE
37 */
38 public function get($id)
39 {
40 return FALSE;
41 }
42
Eric Barnesbffb7762011-04-18 00:03:31 -040043 // ------------------------------------------------------------------------
44
Greg Akerbde25d92010-12-21 09:31:21 -060045 /**
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 Barnesbffb7762011-04-18 00:03:31 -040058
Greg Akerbde25d92010-12-21 09:31:21 -060059 // ------------------------------------------------------------------------
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 Barnesbffb7762011-04-18 00:03:31 -0400115 *
Greg Akerbde25d92010-12-21 09:31:21 -0600116 * @return TRUE;
117 */
118 public function is_supported()
119 {
120 return TRUE;
121 }
122
123 // ------------------------------------------------------------------------
Eric Barnesbffb7762011-04-18 00:03:31 -0400124
Greg Akerbde25d92010-12-21 09:31:21 -0600125}
126// End Class
127
Eric Barnesbffb7762011-04-18 00:03:31 -0400128/* End of file Cache_dummy.php */
129/* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */