ZF-2511: Zend_Cache load strict operator comparison

Issue Type: Docs: Improvement Created: 2008-01-28T09:52:45.000+0000 Last Updated: 2008-09-02T10:39:18.000+0000 Status: Resolved Fix version(s): - 1.6.0 (02/Sep/08)

Reporter: Andries Seutens (andries) Assignee: Fabien MARTY (fab) Tags: - Zend_Cache

Related issues: Attachments:


The code snippets in the Zend_Cache docs don't use the strict operator, thus an empty cache-object behaves like a cache-miss:

<pre class="highlight">
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:

<pre class="highlight">
if (false === ($data = $cache->load($cacheId))) {
    // cache miss


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.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.