Permalink
Browse files

fixes #5976, Xcache::clear()

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7985 3807eeeb-6ff5-0310-8944-8be069107fe0
  • Loading branch information...
1 parent 6026e75 commit c0f767a3aa2da6fc41d45abfe1525535e876d482 gwoo committed Jan 14, 2009
Showing with 2 additions and 6 deletions.
  1. +2 −6 cake/libs/cache/xcache.php
@@ -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

0 comments on commit c0f767a

Please sign in to comment.