Skip to content

Commit

Permalink
fixes #5976, Xcache::clear()
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7985 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information
gwoo committed Jan 14, 2009
1 parent 6026e75 commit c0f767a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions cake/libs/cache/xcache.php
Expand Up @@ -106,16 +106,12 @@ function delete($key) {
* @access public
*/
function clear() {
$result = true;
$this->__auth();
for ($i = 0, $max = xcache_count(XC_TYPE_VAR); $i < $max; $i++) {
if (!xcache_clear_cache(XC_TYPE_VAR, $i)) {
$result = false;
break;
}
xcache_clear_cache(XC_TYPE_VAR, $i);
}
$this->__auth(true);
return $result;
return xcache_count(XC_TYPE_VAR) == 0;
}
/**
* Populates and reverses $_SERVER authentication values
Expand Down

0 comments on commit c0f767a

Please sign in to comment.