/** */ protected function _delete($keys) { $ret = true; foreach ($keys as $val) { if (!$this->_memcache->delete($val)) { $ret = false; } } return $ret; }
/** */ public function expire($key) { $key = $this->_params['prefix'] . $key; unset($this->_expirecache[$key]); $this->_memcache->delete($key . '_e'); return $this->_memcache->delete($key); }
/** */ public function expire($key) { $key = $this->_params['prefix'] . $key; $this->_objectcache[$key] = false; $this->_memcache->delete($key . '_e'); return $this->_memcache->delete($key); }
public static function setUpBeforeClass() { if (!extension_loaded('memcache')) { self::$reason = 'No memcache extension.'; return; } $config = self::getConfig('SESSIONHANDLER_MEMCACHE_TEST_CONFIG', dirname(__FILE__) . '/..'); if (!$config || empty($config['sessionhandler']['memcache'])) { self::$reason = 'No memcache configuration.'; return; } $memcache = new Horde_Memcache($config['sessionhandler']['memcache']); $memcache->delete('sessionid'); $memcache->delete('sessionid2'); self::$handler = new Horde_SessionHandler_Storage_Memcache(array('memcache' => $memcache, 'track' => true)); parent::setUpBeforeClass(); }
/** */ public function destroy($id) { $result = $this->_memcache->delete($id); $this->_memcache->unlock($id); if ($result === false) { return false; } if (!empty($this->_params['track'])) { $this->_memcache->lock($this->_trackID); $ids = $this->_memcache->get($this->_trackID); if ($ids !== false) { unset($ids[$id]); $this->_memcache->set($this->_trackID, $ids); } $this->_memcache->unlock($this->_trackID); } return true; }