ZF-2511: Zend_Cache load strict operator comparison
Description
The code snippets in the Zend_Cache docs don't use the strict operator, thus an empty cache-object behaves like a cache-miss:
if (!($data = $cache->load($cacheId))) {
// cache miss...
}
So if the loaded cache is just empty in a file-cache it looks like: " -1571559392a:0:{}" it will be generated again.
Docs should use the strict comparison:
if (false === ($data = $cache->load($cacheId))) {
// cache miss
}
Comments
Posted by Fabien MARTY (fab) on 2008-06-20T12:53:36.000+0000
fixed in SVN trunk (thanks)
Posted by Wil Sinclair (wil) on 2008-09-02T10:39:18.000+0000
Updating for the 1.6.0 release.