NullCache.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
11 namespace wcmf\lib\io\impl;
12 
14 
15 /**
16  * NullCache acts as no cache.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 class NullCache implements Cache {
21 
22  /**
23  * @see Cache::exists()
24  */
25  public function exists($section, $key) {
26  return false;
27  }
28 
29  /**
30  * @see Cache::get()
31  */
32  public function get($section, $key) {
33  return null;
34  }
35 
36  /**
37  * @see Cache::put()
38  */
39  public function put($section, $key, $value, $lifetime=null) {}
40 
41  /**
42  * @see Cache::clear()
43  */
44  public function clear($section) {}
45 
46  /**
47  * @see Cache::clearAll()
48  */
49  public function clearAll() {}
50 }
51 ?>
NullCache acts as no cache.
Definition: NullCache.php:20
put($section, $key, $value, $lifetime=null)
Definition: NullCache.php:39
Cache defines the interface for cache implementations.
Definition: Cache.php:21
exists($section, $key)
Definition: NullCache.php:25