Created
December 22, 2014 14:18
-
-
Save maverick193/a5d63de497723d5ccc86 to your computer and use it in GitHub Desktop.
Memcached et Can't get filling percentage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ($memSize === null || $memUsed === null) { | |
| $mem = $this->_memcache->getstats(); | |
| if (isset($mem['limit_maxbytes']) && $mem['limit_maxbytes'] > 0) { | |
| return ((int) (100 * ($mem['bytes'] / $mem['limit_maxbytes']))); | |
| } else { | |
| return 100; | |
| } | |
| //ne renvoie plus d'exception | |
| //Zend_Cache::throwException('Can\'t get filling percentage'); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment