Issue 546: Memcache 핸들러 개선 제안

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9686 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ucorina 2011-10-19 10:46:41 +00:00
parent 8de6d4338d
commit 3830e90733

View file

@ -29,9 +29,15 @@
$this->Memcache->addServer($info['host'], $info['port']);
}
}
function isSupport(){
return $this->Memcache->set('xe', 'xe', MEMCACHE_COMPRESSED, 1);
if($GLOBALS['XE_MEMCACHE_SUPPORT']) return true;
if($this->Memcache->set('xe', 'xe', MEMCACHE_COMPRESSED, 1)) {
$GLOBALS['XE_MEMCACHE_SUPPORT'] = true;
} else {
$GLOBALS['XE_MEMCACHE_SUPPORT'] = false;
}
return $GLOBALS['XE_MEMCACHE_SUPPORT'];
}
function getKey($key){
@ -55,7 +61,7 @@
$this->_delete($_key);
return false;
}
return true;
}