memcache = new Memcache; $this->memcache->connect(PHPBB_ACM_MEMCACHE_HOST, PHPBB_ACM_MEMCACHE_PORT); $this->flags = (PHPBB_ACM_MEMCACHE_COMPRESS) ? MEMCACHE_COMPRESSED : 0; } function unload() { parent::unload(); $this->memcache->close(); } /** * Purge cache data */ function purge() { $this->memcache->flush(); parent::purge(); } function read($var) { return $this->memcache->get($var); } function write($var, $data, $ttl = 2592000) { return $this->memcache->set($var, $data, $this->flags, $ttl); } function delete($var) { return $this->memcache->delete($var); } } ?>