3 require_once(
'./Services/GlobalCache/classes/class.ilGlobalCacheService.php');
4 require_once(
'class.ilMemcacheServer.php');
27 if (!(self::$memcache_object instanceof Memcached) and $this->
getInstallable()) {
31 $memcached =
new Memcached();
34 $memcached->resetServerList();
38 foreach ($list as $ilMemcacheServer) {
40 $ilMemcacheServer->getHost(),
41 $ilMemcacheServer->getPort(),
42 $ilMemcacheServer->getWeight(),
45 $memcached->addServers($servers);
48 self::$memcache_object = $memcached;
59 return self::$memcache_object;
81 public function set($key, $serialized_value, $ttl = null)
84 ->set($this->
returnKey($key), $serialized_value, (
int) $ttl);
93 public function get($key)
104 public function delete($key)
115 public function flush($complete =
false)
130 if (!is_array($stats)) {
135 if ($server[
'pid'] > 0) {
152 return class_exists(
'Memcached');
164 if (!$stats[self::STD_SERVER .
':' . self::STD_PORT][
'pid'] > 0) {
165 return 'No Memcached-Server available';
169 return parent::getInstallationFailureReason();
200 if (self::isInstallable()) {
__construct($service_id, $component)
unserialize($serialized_value)
Class ilGlobalCacheService.
static where($where, $operator=null)
getInstallationFailureReason()
__construct(Container $dic, ilPlugin $plugin)