52 self::$active[get_called_class()] = $this->
getActive();
71 if ($this->valid_key_hash != md5(
serialize($this->valid_keys))) {
72 $this->
set(
'valid_keys', $this->
serialize($this->valid_keys));
85 $this->valid_keys = $this->
unserialize($this->
get(
'valid_keys'));
86 $this->valid_key_hash = md5(
serialize($this->valid_keys));
108 abstract public function unserialize($serialized_value);
116 abstract public function get($key);
126 abstract public function set($key, $serialized_value, $ttl = NULL);
134 abstract public function serialize($value);
159 $this->valid_keys[$key] =
true;
185 unset($this->valid_keys[$key]);
187 unset($this->valid_keys);
198 return isset($this->valid_keys[$key]);
206 return self::$active[get_called_class()];
214 return self::$installable[get_called_class()];
226 return str_replace(
'/',
'_', $str);
243 return 'Not installed';
246 return 'Not enough Cache-Memory, set to at least ' . $this->
getMinMemory() .
'M';
249 return 'Unknown reason';
275 if (preg_match(
'/([0-9]*)([M|K])/uism', $memory_limit, $matches)) {
276 switch ($matches[2]) {
278 $memory_limit = $matches[1] * 1024 * 1024;
281 $memory_limit = $matches[1] * 1024;
285 $memory_limit = $memory_limit * 1024 * 1024;
288 return ($memory_limit >= $this->
getMinMemory() * 1024 * 1024);
297 abstract public function exists($key);
305 abstract public function delete($key);
311 abstract public function flush();