### Eclipse Workspace Patch 1.0 #P ZF-STD-TRUNK Index: library/Zend/Cache/Frontend/Class.php =================================================================== --- library/Zend/Cache/Frontend/Class.php (revision 20300) +++ library/Zend/Cache/Frontend/Class.php (working copy) @@ -208,14 +208,14 @@ // We do not have not cache return call_user_func_array(array($this->_cachedEntity, $name), $parameters); } + $id = $this->_makeId($name, $parameters); - if ($this->test($id)) { + if ( ($rs = $this->load($id)) && isset($rs[0], $rs[1]) ) { // A cache is available - $result = $this->load($id); - $output = $result[0]; - $return = $result[1]; + $output = $rs[0]; + $return = $rs[1]; } else { - // A cache is not available + // A cache is not available (or not valid for this frontend) ob_start(); ob_implicit_flush(false); $return = call_user_func_array(array($this->_cachedEntity, $name), $parameters); @@ -224,6 +224,7 @@ $data = array($output, $return); $this->save($data, $id, $this->_tags, $this->_specificLifetime, $this->_priority); } + echo $output; return $return; } Index: library/Zend/Cache/Frontend/Function.php =================================================================== --- library/Zend/Cache/Frontend/Function.php (revision 20300) +++ library/Zend/Cache/Frontend/Function.php (working copy) @@ -89,14 +89,14 @@ // We do not have not cache return call_user_func_array($name, $parameters); } + $id = $this->_makeId($name, $parameters); - if ($this->test($id)) { + if ( ($rs = $this->load($id)) && isset($rs[0], $rs[1])) { // A cache is available - $result = $this->load($id); - $output = $result[0]; - $return = $result[1]; + $output = $rs[0]; + $return = $rs[1]; } else { - // A cache is not available + // A cache is not available (or not valid for this frontend) ob_start(); ob_implicit_flush(false); $return = call_user_func_array($name, $parameters); @@ -105,6 +105,7 @@ $data = array($output, $return); $this->save($data, $id, $tags, $specificLifetime, $priority); } + echo $output; return $return; }