memcache php存储数据

时间:2013-11-16 16:52:17

标签: php caching

当我使用 memcache类并尝试存储缓存内容时,例如

$cache = new \Memcache;
$cache->connect('localhost', 11211) or die('Could not connect to memcache serwer');
$system = $cache->get('system.class');
if (!$system) {

        $object = new system\core\System('system/core/config/configuration.ini');
        $cache->set('system.class', $object, MEMCACHE_COMPRESSED, 10);
        $system = $cache->get('system.class');

}
$system->start();

我将此数据存储到服务器缓存或客户端缓存中吗?

0 个答案:

没有答案
相关问题