Skip to content

Commit c0f767a

Browse files
author
gwoo
committed
fixes #5976, Xcache::clear()
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7985 3807eeeb-6ff5-0310-8944-8be069107fe0
1 parent 6026e75 commit c0f767a

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

cake/libs/cache/xcache.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,16 +106,12 @@ function delete($key) {
106106
* @access public
107107
*/
108108
function clear() {
109-
$result = true;
110109
$this->__auth();
111110
for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) {
112-
if (!xcache_clear_cache(XC_TYPE_VAR, $i)) {
113-
$result = false;
114-
break;
115-
}
111+
xcache_clear_cache(XC_TYPE_VAR, $i);
116112
}
117113
$this->__auth(true);
118-
return $result;
114+
return xcache_count(XC_TYPE_VAR) == 0;
119115
}
120116
/**
121117
* Populates and reverses $_SERVER authentication values

0 commit comments

Comments
 (0)