public function __construct($cacheKey, array $configuration, array $htmlCacheOptions) { parent::__construct($cacheKey, $configuration, $htmlCacheOptions); $this->memcached = \StaticHtmlMemcachedResponse::getConnection($configuration, $htmlCacheOptions); if ($this->memcached !== null) { $this->memcached->setCompressThreshold(0); } $this->compression = !isset($htmlCacheOptions["MEMCACHE_COMPRESSION"]) || $htmlCacheOptions["MEMCACHE_COMPRESSION"] !== "N"; }
/** * Closes connection to the memcached server */ public static function close() { if (self::$memcached !== null) { self::$memcached->close(); self::$memcached = null; } }