blob: a3bdc3c8016b6bd84dd8479a5c98b20b24a11676 [file] [log] [blame]
Andrey Andreevc5536aa2012-11-01 17:33:58 +02001<?php
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
Andrey Andreevc5536aa2012-11-01 17:33:58 +020021 * @copyright Copyright (c) 2008 - 2012, EllisLab, Inc. (http://ellislab.com/)
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 */
Andrey Andreevc5536aa2012-11-01 17:33:58 +020027defined('BASEPATH') OR exit('No direct script access allowed');
Greg Akerbde25d92010-12-21 09:31:21 -060028
Greg Akerbde25d92010-12-21 09:31:21 -060029/**
Eric Barnesbffb7762011-04-18 00:03:31 -040030 * CodeIgniter Dummy Caching Class
Greg Akerbde25d92010-12-21 09:31:21 -060031 *
32 * @package CodeIgniter
33 * @subpackage Libraries
34 * @category Core
Derek Jonesf4a4bd82011-10-20 12:18:42 -050035 * @author EllisLab Dev Team
Eric Barnesbffb7762011-04-18 00:03:31 -040036 * @link
Greg Akerbde25d92010-12-21 09:31:21 -060037 */
Phil Sturgeoneb2dcda2011-04-02 14:44:58 +010038class CI_Cache_dummy extends CI_Driver {
Greg Akerbde25d92010-12-21 09:31:21 -060039
40 /**
Eric Barnesbffb7762011-04-18 00:03:31 -040041 * Get
Greg Akerbde25d92010-12-21 09:31:21 -060042 *
43 * Since this is the dummy class, it's always going to return FALSE.
44 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030045 * @param string
46 * @return bool FALSE
Greg Akerbde25d92010-12-21 09:31:21 -060047 */
48 public function get($id)
49 {
50 return FALSE;
51 }
52
Eric Barnesbffb7762011-04-18 00:03:31 -040053 // ------------------------------------------------------------------------
54
Greg Akerbde25d92010-12-21 09:31:21 -060055 /**
56 * Cache Save
57 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030058 * @param string Unique Key
59 * @param mixed Data to store
60 * @param int Length of time (in seconds) to cache the data
61 * @return bool TRUE, Simulating success
Greg Akerbde25d92010-12-21 09:31:21 -060062 */
63 public function save($id, $data, $ttl = 60)
64 {
65 return TRUE;
66 }
Eric Barnesbffb7762011-04-18 00:03:31 -040067
Greg Akerbde25d92010-12-21 09:31:21 -060068 // ------------------------------------------------------------------------
69
70 /**
71 * Delete from Cache
72 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030073 * @param mixed unique identifier of the item in the cache
Timothy Warren0688ac92012-04-20 10:25:04 -040074 * @return bool TRUE, simulating success
Greg Akerbde25d92010-12-21 09:31:21 -060075 */
76 public function delete($id)
77 {
78 return TRUE;
79 }
80
81 // ------------------------------------------------------------------------
82
83 /**
84 * Clean the cache
85 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030086 * @return bool TRUE, simulating success
Greg Akerbde25d92010-12-21 09:31:21 -060087 */
88 public function clean()
89 {
90 return TRUE;
91 }
92
93 // ------------------------------------------------------------------------
94
95 /**
96 * Cache Info
97 *
Andrey Andreevb24b0332012-03-26 15:34:39 +030098 * @param string user/filehits
99 * @return bool FALSE
Greg Akerbde25d92010-12-21 09:31:21 -0600100 */
101 public function cache_info($type = NULL)
102 {
103 return FALSE;
104 }
105
106 // ------------------------------------------------------------------------
107
108 /**
109 * Get Cache Metadata
110 *
Andrey Andreevb24b0332012-03-26 15:34:39 +0300111 * @param mixed key to get cache metadata on
112 * @return bool FALSE
Greg Akerbde25d92010-12-21 09:31:21 -0600113 */
114 public function get_metadata($id)
115 {
116 return FALSE;
117 }
118
119 // ------------------------------------------------------------------------
120
121 /**
122 * Is this caching driver supported on the system?
123 * Of course this one is.
Eric Barnesbffb7762011-04-18 00:03:31 -0400124 *
Andrey Andreevb24b0332012-03-26 15:34:39 +0300125 * @return bool TRUE
Greg Akerbde25d92010-12-21 09:31:21 -0600126 */
127 public function is_supported()
128 {
129 return TRUE;
130 }
131
Greg Akerbde25d92010-12-21 09:31:21 -0600132}
Greg Akerbde25d92010-12-21 09:31:21 -0600133
Eric Barnesbffb7762011-04-18 00:03:31 -0400134/* End of file Cache_dummy.php */
Andrey Andreevb24b0332012-03-26 15:34:39 +0300135/* Location: ./system/libraries/Cache/drivers/Cache_dummy.php */