ZF-9428: Empty MemCached throws on getFillingPercentage
Description
Due to the logic
if (!$memSize || !$memUsed) {
Zend_Cache::throwException('Can\'t get filling percentage');
}
The following code will throw an error rather then return 0
$memCache->clean(Zend_Cache::CLEANING_MODE_ALL);
echo $memCache->getFillingPercentage();
Comments
Posted by Urda (urda) on 2010-03-15T10:15:59.000+0000
I can confirm this issue. In our Zend Framework application using Backend, when the cache is cold we get really nasty can't get filling percentage errors. This only occurs when the cache is completely empty, when something is added it starts running normally again.
Posted by Urda (urda) on 2010-03-15T10:23:39.000+0000
In regards to my comment, here is some information:
PHP Version 5.2.10-2ubuntu6.4 Zend Version 1.10.1
apache/2.2.12 (Ubuntu)
Posted by Thomas Weidner (thomas) on 2010-03-15T11:11:56.000+0000
Assigned component
Posted by Marc Bennewitz (private) (mabe) on 2010-03-16T10:49:26.000+0000
I committed a fix in trunk on r21519. Please check if it is working fine for you.
Posted by Urda (urda) on 2010-03-17T09:00:50.000+0000
Yes! The fix in the trunk corrected the problem
Posted by Marc Bennewitz (private) (mabe) on 2010-03-17T11:23:44.000+0000
fixed in r21519 (trunk) & r21535 (1.10 branch)