Added feature 9097: Introduce a new caching framework (backported from FLOW3)
[Packages/TYPO3.CMS.git] / t3lib / cache / backend / class.t3lib_cache_backend_null.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2008 Ingo Renner <ingo@typo3.org>
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 *
17 * This script is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * This copyright notice MUST APPEAR in all copies of the script!
23 ***************************************************************/
24
25
26 /**
27 * A caching backend which forgets everything immediately
28 *
29 * This file is a backport from FLOW3
30 *
31 * @package TYPO3
32 * @subpackage t3lib_cache
33 * @version $Id$
34 */
35 class t3lib_cache_backend_Null extends t3lib_cache_AbstractBackend {
36
37 /**
38 * Acts as if it would save data
39 *
40 * @param string ignored
41 * @param string ignored
42 * @param array ignored
43 * @param integer ignored
44 * @return void
45 * @author Robert Lemke <robert@typo3.org>
46 */
47 public function save($entryIdentifier, $data, array $tags = array(), $lifetime = NULL) {
48 }
49
50 /**
51 * Returns False
52 *
53 * @param string ignored
54 * @return boolean FALSE
55 * @author Robert Lemke <robert@typo3.org>
56 */
57 public function load($entryIdentifier) {
58 return FALSE;
59 }
60
61 /**
62 * Returns False
63 *
64 * @param string ignored
65 * @return boolean FALSE
66 * @author Robert Lemke <robert@typo3.org>
67 */
68 public function has($entryIdentifier) {
69 return FALSE;
70 }
71
72 /**
73 * Does nothing
74 *
75 * @param string ignored
76 * @return boolean FALSE
77 * @author Robert Lemke <robert@typo3.org>
78 */
79 public function remove($entryIdentifier) {
80 return FALSE;
81 }
82
83 /**
84 * Returns an empty array
85 *
86 * @param string ignored
87 * @return array An empty array
88 * @author Robert Lemke <robert@typo3.org>
89 */
90 public function findEntriesByTag($tag) {
91 return array();
92 }
93
94 /**
95 * Returns an empty array
96 *
97 * @param string ignored
98 * @return array An empty array
99 * @author Ingo Renner <ingo@typo3.org>
100 */
101 public function findEntriesByTags(array $tags) {
102 return array();
103 }
104
105 /**
106 * Does nothing
107 *
108 * @return void
109 * @author Robert Lemke <robert@typo3.org>
110 */
111 public function flush() {
112 }
113
114 /**
115 * Does nothing
116 *
117 * @param string ignored
118 * @return void
119 * @author Robert Lemke <robert@typo3.org>
120 */
121 public function flushByTag($tag) {
122 }
123 }
124
125
126 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_null.php']) {
127 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/cache/backend/class.t3lib_cache_backend_null.php']);
128 }
129
130 ?>