2 require_once(
'./Services/GlobalCache/classes/class.ilGlobalCacheService.php');
37 return xcache_isset($this->
returnKey($key));
48 public function set($key, $serialized_value, $ttl = null)
50 return xcache_set($this->
returnKey($key), $serialized_value, $ttl);
59 public function get($key)
61 return xcache_get($this->
returnKey($key));
70 public function delete($key)
72 return xcache_unset($this->
returnKey($key));
81 public function flush($complete =
false)
83 $_SERVER[
"PHP_AUTH_USER"] =
"xcache";
86 xcache_clear_cache(XC_TYPE_VAR, 0);
119 $function_exists = function_exists(
'xcache_set');
120 $var_size = ini_get(
'xcache.var_size') !=
'0M';
121 $var_count = ini_get(
'xcache.var_count') > 0;
122 $api = (php_sapi_name() !==
'cli');
124 $active = $function_exists and $var_size and $var_count and $api;
135 return function_exists(
'xcache_set');
145 return xcache_info(XC_TYPE_VAR, 0);
155 return ini_get(
'xcache.var_size');
164 return self::MIN_MEMORY;
175 if ($this->valid_key_hash != md5(
serialize($this->valid_keys))) {
176 $this->
set(
'valid_keys', $this->
serialize($this->valid_keys));
190 $this->valid_keys = $this->
unserialize($this->
get(
'valid_keys'));
191 $this->valid_key_hash = md5(
serialize($this->valid_keys));
Class ilGlobalCacheService.
unserialize($serialized_value)
__construct(Container $dic, ilPlugin $plugin)
__construct($serviceId, $component)
ilXcache constructor.