3 require_once(
'./Services/GlobalCache/classes/class.ilGlobalCacheService.php');
4 require_once(
'./Services/Environment/classes/class.ilRuntime.php');
27 if (function_exists(
'apcu_exists')) {
28 return apcu_exists($this->
returnKey($key));
30 return apcu_fetch($this->
returnKey($key));
42 public function set($key, $serialized_value, $ttl = 0)
44 return apcu_store($this->
returnKey($key), $serialized_value, $ttl);
53 public function get($key)
55 return apcu_fetch($this->
returnKey($key));
64 public function delete($key)
66 return apcu_delete($this->
returnKey($key));
75 public function flush($complete =
false)
78 return function_exists(
'apcu_clear_cache') && apcu_clear_cache();
100 return ($serialized_value);
111 $cache_info = apc_cache_info();
113 unset($cache_info[
'cache_list']);
114 unset($cache_info[
'slot_distribution']);
116 $return[
'__cache_info'] = array(
117 'apc.enabled' => ini_get(
'apc.enabled'),
118 'apc.shm_size' => ini_get(
'apc.shm_size'),
119 'apc.shm_segments' => ini_get(
'apc.shm_segments'),
120 'apc.gc_ttl' => ini_get(
'apc.gc_ttl'),
121 'apc.user_ttl' => ini_get(
'apc.ttl'),
122 'info' => $cache_info,
125 $cache_info = apc_cache_info();
126 foreach ($cache_info[
'cache_list'] as $dat) {
130 $return[$key] = apc_fetch($key);
140 return function_exists(
'apcu_store');
149 return function_exists(
'apcu_store');
162 return ini_get(
'apc.shm_size');
171 return self::MIN_MEMORY;
Class ilGlobalCacheService.
unserialize($serialized_value)