fix #445 APC에서 delete()가 null을 삽입하는 문제 수정

This commit is contained in:
bnu 2014-02-08 13:58:52 +09:00
parent 9af3c9efc1
commit ad0144b4e1

View file

@ -84,7 +84,7 @@ class CacheApc extends CacheBase
if($modified_time > 0 && $modified_time > $obj[0])
{
$this->_delete($_key);
$this->delete($_key);
return false;
}
@ -110,24 +110,13 @@ class CacheApc extends CacheBase
if($modified_time > 0 && $modified_time > $obj[0])
{
$this->_delete($_key);
$this->delete($_key);
return false;
}
return $obj[1];
}
/**
* Delete variable from the cache(private)
*
* @param string $_key Used to store the value.
* @return void
*/
function _delete($_key)
{
$this->put($_key, null, 1);
}
/**
* Delete variable from the cache
*
@ -136,7 +125,7 @@ class CacheApc extends CacheBase
*/
function delete($key)
{
$this->_delete($key);
return apc_delete($key);
}
/**
@ -149,7 +138,13 @@ class CacheApc extends CacheBase
return apc_clear_cache('user');
}
/**
* @DEPRECATED
*/
function _delete($key)
{
return $this->delete($key);
}
}
CacheApc::$isSupport = function_exists('apc_add');