I have a site that doesn't seem to be flushing memcached when the cache is flushed via the button "Flush Cache Storage". I have to manually log into the daemon by telnet and run flush_all to flush the cache

Am I misunderstanding something or is there some issue? I did check to make sure SELinux wasn't the culprit and it doesn't seem to be

Magento Enterprise and my config is below.

            <date><![CDATA[Tue, 05 Feb 2013 21:48:55 +0000]]></date>
                    <initStatements><![CDATA[SET NAMES utf8]]></initStatements>
  • Would be interested in this as we are having similar issues in relation to load balanced server setups, we have resorted currently to using a bash script to restart memcache on git deploy
    – lukefowell
    Commented May 30, 2013 at 9:16
  • 1
    Just to confirm> "Flush Cache Storage" should work. It is the only cache manipulation option which works for memcached, but it should work.
    – benmarks
    Commented May 30, 2013 at 13:57
  • 1
    Did you try to clear cache using simpe php script? Does it work? Commented Aug 15, 2013 at 10:13
  • Note that memcached has command line option that disables "flush_all" command. Check ps -Aw x |grep memcached for -F option.
    – matt
    Commented Dec 28, 2013 at 10:29
  • Be careful with <hashed_directory_umask><![CDATA[]]></hashed_directory_umask>. It's been replaced with hashed_directory_perm in later version of Zend (and therefore Magento.)
    – Tyler V.
    Commented Jun 6, 2014 at 23:55

2 Answers 2


How do you know the cache isn't being cleared? I had a similar problem today, but I was relying on the "curr_items" count in Memcached to test it, which isn't an accurate test.

I set up a Magento shell, which called:


This is the method that the "Flush Cache Storage" button calls in the Magento admin. I wanted to check that Memcached was really getting cleared.

I connected to Memcached using telnet, and monitored the "curr_items" count before and after clearing the cache. It barely changed (usually just dropped by one item).

Then I found this: http://www.couchbase.com/issues/browse/MB-2258

It says that the "curr_items" count doesn't drop, even when a (brutal) flush_all is executed directly on the Memcached server. The count only drops the next time someone tries to access a key which no longer exists.

True enough, that's what happened. My cache was being cleared as desired, but only when I refreshed a few pages for the first time, did the count drop (and then rise again, on subsequent requests).

I observed the same results when I ran flush_all from the telnet connection. The count remained unchanged, until I tried to access one of the former keys, at which point the count dropped by one.


Check your connection with the db in that config. Make sure that its the right database username, password and database name. If its not connecting with Magento then it wont listen to the flush cache storage button.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.