blob: 3f2b4b956c7c4440ef8368c1bc79f3056ec44946 [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 *
Phil Sturgeon07c1ac82012-03-09 17:03:37 +00005 * An open source application development framework for PHP 5.2.4 or newer
Derek Jonesf4a4bd82011-10-20 12:18:42 -05006 *
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
Greg Aker0defe5d2012-01-01 18:46:41 -060021 * @copyright Copyright (c) 2006 - 2012 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
Greg Akerbde25d92010-12-21 09:31:21 -060028/**
Eric Barnesbffb7762011-04-18 00:03:31 -040029 * CodeIgniter Dummy Caching Class
Greg Akerbde25d92010-12-21 09:31:21 -060030 *
31 * @package CodeIgniter
32 * @subpackage Libraries
33 * @category Core
Derek Jonesf4a4bd82011-10-20 12:18:42 -050034 * @author EllisLab Dev Team
Eric Barnesbffb7762011-04-18 00:03:31 -040035 * @link
Greg Akerbde25d92010-12-21 09:31:21 -060036 */
Phil Sturgeoneb2dcda2011-04-02 14:44:58 +010037class CI_Cache_dummy extends CI_Driver {
Greg Akerbde25d92010-12-21 09:31:21 -060038
39 /**
Eric Barnesbffb7762011-04-18 00:03:31 -040040 * Get
Greg Akerbde25d92010-12-21 09:31:21 -060041 *
42 * Since this is the dummy class, it's always going to return FALSE.
43 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030044 * @param string
45 * @return bool FALSE
Greg Akerbde25d92010-12-21 09:31:21 -060046 */
47 public function get($id)
48 {
49 return FALSE;
50 }
51
Eric Barnesbffb7762011-04-18 00:03:31 -040052 // ------------------------------------------------------------------------
53
Greg Akerbde25d92010-12-21 09:31:21 -060054 /**
55 * Cache Save
56 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030057 * @param string Unique Key
58 * @param mixed Data to store
59 * @param int Length of time (in seconds) to cache the data
60 * @return bool TRUE, Simulating success
Greg Akerbde25d92010-12-21 09:31:21 -060061 */
62 public function save($id, $data, $ttl = 60)
63 {
64 return TRUE;
65 }
Eric Barnesbffb7762011-04-18 00:03:31 -040066
Greg Akerbde25d92010-12-21 09:31:21 -060067 // ------------------------------------------------------------------------
68
69 /**
70 * Delete from Cache
71 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030072 * @param mixed unique identifier of the item in the cache
Timothy Warren0688ac92012-04-20 10:25:04 -040073 * @return bool TRUE, simulating success
Greg Akerbde25d92010-12-21 09:31:21 -060074 */
75 public function delete($id)
76 {
77 return TRUE;
78 }
79
80 // ------------------------------------------------------------------------
81
82 /**
83 * Clean the cache
84 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030085 * @return bool TRUE, simulating success
Greg Akerbde25d92010-12-21 09:31:21 -060086 */
87 public function clean()
88 {
89 return TRUE;
90 }
91
92 // ------------------------------------------------------------------------
93
94 /**
95 * Cache Info
96 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030097 * @param string user/filehits
98 * @return bool FALSE
Greg Akerbde25d92010-12-21 09:31:21 -060099 */
100 public function cache_info($type = NULL)
101 {
102 return FALSE;
103 }
104
105 // ------------------------------------------------------------------------
106
107 /**
108 * Get Cache Metadata
109 *
Andrey Andreevb24b0332012-03-26 15:34:39 +0300110 * @param mixed key to get cache metadata on
111 * @return bool FALSE
Greg Akerbde25d92010-12-21 09:31:21 -0600112 */
113 public function get_metadata($id)
114 {
115 return FALSE;
116 }
117
118 // ------------------------------------------------------------------------
119
120 /**
121 * Is this caching driver supported on the system?
122 * Of course this one is.
Eric Barnesbffb7762011-04-18 00:03:31 -0400123 *
Andrey Andreevb24b0332012-03-26 15:34:39 +0300124 * @return bool TRUE
Greg Akerbde25d92010-12-21 09:31:21 -0600125 */
126 public function is_supported()
127 {
128 return TRUE;
129 }
130
Greg Akerbde25d92010-12-21 09:31:21 -0600131}
Greg Akerbde25d92010-12-21 09:31:21 -0600132
Eric Barnesbffb7762011-04-18 00:03:31 -0400133/* End of file Cache_dummy.php */
Andrey Andreevb24b0332012-03-26 15:34:39 +0300134/* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */