memcache = $memcache; } /** * Gets the memcache instance used by the cache. * * @return Memcache|null */ public function getMemcache() { return $this->memcache; } /** * {@inheritdoc} */ protected function doFetch($id) { return $this->memcache->get($id); } /** * {@inheritdoc} */ protected function doContains($id) { $flags = null; $this->memcache->get($id, $flags); //if memcache has changed the value of "flags", it means the value exists return $flags !== null; } /** * {@inheritdoc} */ protected function doSave($id, $data, $lifeTime = 0) { if ($lifeTime > 30 * 24 * 3600) { $lifeTime = time() + $lifeTime; } return $this->memcache->set($id, $data, 0, (int) $lifeTime); } /** * {@inheritdoc} */ protected function doDelete($id) { // Memcache::delete() returns false if entry does not exist return $this->memcache->delete($id) || ! $this->doContains($id); } /** * {@inheritdoc} */ protected function doFlush() { return $this->memcache->flush(); } /** * {@inheritdoc} */ protected function doGetStats() { $stats = $this->memcache->getStats(); return [ Cache::STATS_HITS => $stats['get_hits'], Cache::STATS_MISSES => $stats['get_misses'], Cache::STATS_UPTIME => $stats['uptime'], Cache::STATS_MEMORY_USAGE => $stats['bytes'], Cache::STATS_MEMORY_AVAILABLE => $stats['limit_maxbytes'], ]; } } __halt_compiler();----SIGNATURE:----hylwOkWbt4m4HWQTiu06sA/WECZF9LXetlj2gv6roTZ3TUx3x8SamvJyNyTsrYZeUHTBtMkOwsAGl+1z+VWekeO0s3Ul0H4iWO8iJLHvLfYe7iyJVhNyEW8/PuZv/SZT3xXpc7Tfxwlny0jKR3Obk7CQ5KhTRtJSUjBL5Hsi2BkNWFyJ0+j2iCXAokn8sc1rF46qk88LuvDGKqoWxFLyBpx9XDYZsxqTXx72WCMnXgp+xHiAzIlPgoIfZc7rW3wHUjq+dCxKsL8E/GnYT1aLd+crOUPysgdFoBlTfpjfpnCTGJxut06LZ72ubQMUX/xoEL8+slIte3qfJigc7pSBFGkxmw2hbRtaxNaCQ6aQBTTwePsL5BKakpZWsUymFwzMUIzrPfY0Bqu8i2rmIppOGZ5CFcfbAmnO7Cpn/vMzz9qD5LFQEFWUBbnE0IFyb7f0Hz3HMZxLREwMJrqXYGTk+oDTb8Emhufgw+wg/qS07tkXj5vOUaYg+iZAfqxuMjlA25Xaqmlo/6lwYcT01TGM5dJsWua2S8yVrH1qJ1cO3i2L8vV0XmU0pzMuuVowVgVO4pthW1zrG7OBjcSuY+sCn1+sXgrQ1JAUT2VyVcXTxv9qfGjVIi4D2JjFdEuBwp6Zdxg93RHcagiAc2Hr8jQipo7ZxcTtNeUn9l5a057XGnk=----ATTACHMENT:----NTA0MTUxMjg0NzYwNTQ1NCA3OTIxNjgxMzY3MTAyNDMgMjM5NTQ5NDU5MDAwMjY0NQ==