ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilStaticCache.php
Go to the documentation of this file.
1<?php
2
3require_once('./Services/GlobalCache/classes/class.ilGlobalCacheService.php');
4
14{
15
19 protected function getActive()
20 {
21 return true;
22 }
23
24
28 protected function getInstallable()
29 {
30 return true;
31 }
32
33
37 protected static $cache = array();
38
39
45 public function exists($key)
46 {
47 return isset(self::$cache[$this->getComponent()][$key]);
48 }
49
50
58 public function set($key, $serialized_value, $ttl = null)
59 {
60 return self::$cache[$this->getComponent()][$key] = $serialized_value;
61 }
62
63
69 public function get($key)
70 {
71 return self::$cache[$this->getComponent()][$key];
72 }
73
74
80 public function delete($key)
81 {
82 unset(self::$cache[$this->getComponent()][$key]);
83 }
84
89 public function flush($complete = false)
90 {
91 if ($complete) {
92 self::$cache = array();
93 } else {
94 unset(self::$cache[$this->getComponent()]);
95 }
96
97 return true;
98 }
99
100
106 public function serialize($value)
107 {
108 return ($value);
109 }
110
111
117 public function unserialize($serialized_value)
118 {
119 return ($serialized_value);
120 }
121}
An exception for terminatinating execution or to throw for unit testing.
Class ilGlobalCacheService.
Class ilStaticCache.
unserialize($serialized_value)
flush($complete=false)