Пример #1
0
        return $this->enabled;
    }
    function read($key)
    {
        $cache_key = $this->_buildCacheKey($key);
        if ($this->enabled) {
            return $this->lib->get($cache_key);
        }
    }
    function write($key, $val)
    {
        global $prefs;
        if ($this->enabled) {
            $this->lib->set($this->_buildCacheKey($key), $val, 60 * $prefs['session_lifetime']);
        }
        return $this->enabled;
    }
    function destroy($key)
    {
        if ($this->enabled) {
            $this->lib->delete($this->_buildCacheKey($key));
        }
        return $this->enabled;
    }
    function gc($maxlifetime)
    {
    }
}
$memcache_session = new MemcacheSession();
$memcache_session->_init();