Will either of the buttons FLUSH REDIS?

enter image description here


3 Answers 3


The "Flush Magento Cache" button will only flush out cache records based on their tags. This uses the Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG mode when calling clean on the cache backend.

The "Flush Cache Storage" button will flush the entire cache backing (where the backend supports it), using the Zend_Cache::CLEANING_MODE_ALL mode when calling clean on the cache backend.

The Cm_Cache_Backend_Redis does differentiate between the two modes and properly handles them both.

What happens in Redis when the "Cache Storage" is flushed:

1380734058.807909 [0] "flushdb"

What happens in Redis when the "Magento Cache" is flushed looks something like this...

1380733999.123304 [0] "sunion" "zc:ti:541_MAGE"
1380733999.127239 [0] "multi"
1380733999.127294 [0] "del" "zc:k:541_APP_E4D52B98688947405EDE639E947EE03D" "zc:k:541_CORE_CACHE_OPTIONS" ... etc ...
1380733999.127493 [0] "del" "zc:ti:541_MAGE"
1380733999.127523 [0] "srem" "zc:tags" "541_MAGE"
1380733999.127547 [0] "exec"
1380733999.128596 [0] "sunion" "zc:ti:541_CONFIG"
1380733999.131160 [0] "multi"
1380733999.131192 [0] "del" "zc:k:541_CONFIG_GLOBAL_ADMIN" "zc:k:541_ENTERPRISE_LOGGING_CONFIG" ... etc ...
1380733999.131360 [0] "del" "zc:ti:541_CONFIG"
1380733999.131379 [0] "srem" "zc:tags" "541_CONFIG"
1380733999.131397 [0] "exec"

You'll notice that in the first one a single command is processed by Redis vs the later example where two cache prefixes are used to delete all associated cache records. Based on what I'm seeing here (and in the code) both the '541_MAGE' and '541_CONFIG' prefixes are flushed in separate calls to the cache backend, with the config immediately following the other.

  • The only thing I didn't verify is that the flushddb properly clears both databases, but I think it's safe to assume it does, as I've not had trouble with it
    – davidalger
    Commented Oct 2, 2013 at 17:54
  • You can use flushall for everything or flushdb for an individual database. Commented Jul 24, 2014 at 0:57

I've created a module that will let you do more bulk operations from the admin. Clicking "Flush DB" will actually execute the flushdb command.

enter image description here

Download: https://github.com/steverobbins/Magento-Redismanager

Otherwise you have to use command line to flush them "completely"


To actually answer your question : "Will either of the buttons FLUSH REDIS?"

YES is the answer, you can clean Magento's cache through the admin. You can also flushdb from the command line, but that wasn't your question...

Not sure why this is voted down... if you're properly using redis for cache on the backend this will work.

You also should have

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.