Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.7.16

Bug #12750 Clean memory cache
Submitted: 2007-12-21 10:28 UTC Modified: 2008-04-13 09:41 UTC
From: pjh Assigned: tacker
Status: Closed Package: Cache_Lite (version 1.7.2)
PHP Version: 5.2.4 OS: XP SP2
Roadmaps: 1.7.3    
Subscription  


 [2007-12-21 10:28 UTC] pjh (Peter Hofstee)
Description: ------------ _cleanDir does always not clean values in memory. A reset() is missing before line 601: while (list($key, ) = each($this->_memoryCachingArray)) { Just make it like the next one: reset($this->_memoryCachingArray); while (list($key, ) = each($this->_memoryCachingArray)) { Or like: foreach($this->_memoryCachingArray as $key => $data) { But I assume the first one is faster. Test script: --------------- Sorry, I don't have one particular for this problem. It is running as part of a bigger test in my own test environment. Just add a value and call Clean() and test the lengt of _memoryCacheArray to see that it is not empty. I finally printed $this->_memoryCachingArray to see that the mem cache still contained the keys it was supposed to delete.

Comments

 [2008-04-13 09:41 UTC] tacker (Markus Tacker)
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.