I am using the file front end and the
Zend_Cache_Backend_ZendServer_ShMem back end. When I try to load
something that is not already in the cache it throws an exception.
This is because the file front end does a test first and the test
method in the zend server backend throws an exception if _fetch()
cannot find the requested id. Here is the test method:
public function test($id)
{
$tmp = $this->_fetch('internal-metadatas---' . $id);
if ($tmp !== null) {
if (!is_array($tmp) || !isset($tmp['mtime'])) {
Zend_Cache::throwException('Cache metadata for \'' .
$id .
'\' id is corrupted' );
}
return $tmp['mtime'];
}
return false;
}
The problem seems to be in that first if. _fetch() calls
zend_shm_cache_fetch() which will return false if the item is not
found (http://files.zend.com/help/Zend-Server/zenddatacache.html). I
would think that it should be if ($tmp !== false)
Am I missing something? Or is this a bug?
Mark
--
Have fun or die trying - but try not to actually die.