mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-31 17:19:59 +09:00
fix #445 APC에서 delete()가 null을 삽입하는 문제 수정
This commit is contained in:
parent
fc7673c787
commit
34fca81212
1 changed files with 10 additions and 15 deletions
25
classes/cache/CacheApc.class.php
vendored
25
classes/cache/CacheApc.class.php
vendored
|
|
@ -84,7 +84,7 @@ class CacheApc extends CacheBase
|
||||||
|
|
||||||
if($modified_time > 0 && $modified_time > $obj[0])
|
if($modified_time > 0 && $modified_time > $obj[0])
|
||||||
{
|
{
|
||||||
$this->_delete($_key);
|
$this->delete($_key);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -110,24 +110,13 @@ class CacheApc extends CacheBase
|
||||||
|
|
||||||
if($modified_time > 0 && $modified_time > $obj[0])
|
if($modified_time > 0 && $modified_time > $obj[0])
|
||||||
{
|
{
|
||||||
$this->_delete($_key);
|
$this->delete($_key);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $obj[1];
|
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
|
* Delete variable from the cache
|
||||||
*
|
*
|
||||||
|
|
@ -136,7 +125,7 @@ class CacheApc extends CacheBase
|
||||||
*/
|
*/
|
||||||
function delete($key)
|
function delete($key)
|
||||||
{
|
{
|
||||||
$this->_delete($key);
|
return apc_delete($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -149,7 +138,13 @@ class CacheApc extends CacheBase
|
||||||
return apc_clear_cache('user');
|
return apc_clear_cache('user');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @DEPRECATED
|
||||||
|
*/
|
||||||
|
function _delete($key)
|
||||||
|
{
|
||||||
|
return $this->delete($key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CacheApc::$isSupport = function_exists('apc_add');
|
CacheApc::$isSupport = function_exists('apc_add');
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue