Flushing REDIS Cache

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 127.0.0.1:61926] "flushdb"

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

1380733999.123304 [0 127.0.0.1:61889] "sunion" "zc:ti:541_MAGE"
1380733999.127239 [0 127.0.0.1:61889] "multi"
1380733999.127294 [0 127.0.0.1:61889] "del" "zc:k:541_APP_E4D52B98688947405EDE639E947EE03D" "zc:k:541_CORE_CACHE_OPTIONS" ... etc ...
1380733999.127493 [0 127.0.0.1:61889] "del" "zc:ti:541_MAGE"
1380733999.127523 [0 127.0.0.1:61889] "srem" "zc:tags" "541_MAGE"
1380733999.127547 [0 127.0.0.1:61889] "exec"
1380733999.128596 [0 127.0.0.1:61889] "sunion" "zc:ti:541_CONFIG"
1380733999.131160 [0 127.0.0.1:61889] "multi"
1380733999.131192 [0 127.0.0.1:61889] "del" "zc:k:541_CONFIG_GLOBAL_ADMIN" "zc:k:541_ENTERPRISE_LOGGING_CONFIG" ... etc ...
1380733999.131360 [0 127.0.0.1:61889] "del" "zc:ti:541_CONFIG"
1380733999.131379 [0 127.0.0.1:61889] "srem" "zc:tags" "541_CONFIG"
1380733999.131397 [0 127.0.0.1:61889] "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.


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