Object cache의 데이터를 삭제하지 못하는 버그 수정
This commit is contained in:
@ -61,29 +61,39 @@ Class G5_object_cache {
|
|||||||
$this->contents[$group][$key] = $data;
|
$this->contents[$group][$key] = $data;
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
$datas = $this->etcs[$group][$key] = $data;
|
$this->etcs[$group][$key] = $data;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
|
* cache 데이터 제거
|
||||||
|
* @param string $type
|
||||||
|
* @param string $key
|
||||||
|
* @param string $group
|
||||||
|
* @return bool
|
||||||
|
* kkigomi 님이 고쳐주심
|
||||||
|
*/
|
||||||
|
function delete($type, $key, $group = 'default')
|
||||||
|
{
|
||||||
|
if (!$this->exists($type, $key, $group)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function delete($key, $group='default') {
|
switch ($type) {
|
||||||
switch ($key) {
|
|
||||||
case 'bbs':
|
case 'bbs':
|
||||||
$datas = $this->writes;
|
$datas = &$this->writes;
|
||||||
break;
|
break;
|
||||||
case 'content':
|
case 'content':
|
||||||
$datas = $this->contents;
|
$datas = &$this->contents;
|
||||||
break;
|
break;
|
||||||
default :
|
default:
|
||||||
$datas = $this->etcs;
|
$datas = &$this->etcs;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! $this->exists('bbs', $key, $group) )
|
unset($datas[$group][$key]);
|
||||||
return false;
|
|
||||||
|
|
||||||
unset( $datas[$group][$key] );
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user