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...
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.
Flush and refresh: Refreshing means that it cleans up alle the invalidated cache keys. for example: when you save a widget while the cache is active you get a message that the cache is invalid. In this instance you don't need to flush the cache, just refresh it. Flushing means that it throws all the cache away, it will rebuild everything from scratch.
CSS/Javascript cache: This cache is separate from the default cache. The normal cache will store in a cache-backend. That can be the var/cache/ folder, it can be memcache or redis, etc. The CSS/JS cache is stored in the media/css and media/js folders (you can thus safely delete those folders at will). Flushing browser cache is a good idea, certainly if cache headers are set up. You can also auto-version your css/js files to fix this: https://github.com/fbrnc/Aoe_JsCssTstamp
Flush Cache Storage/Flush Magento Cache: If you flush the magento cache storage it will flush all the cache options that are mentioned in the cache-table. If you flush the cache storage, everything is flushed. By default there is some database caching used by Zend that only get flushed this way.
Deleting contents of /var/cache and /var/sessions: When deleting var/cache everything is flushed except css/js (those are in the media folder). To remove sessions you need to delete the var/sessions folder (you can also store sessions in the database or redis/memcache), but you'll rarely have to. Doing this on a live server may cause problems (carts get lost).
In case anyone sees this. I've posted this info elsewhere, but the 109 and 403 prefixes come from an MD5 hash of the path to the path/etc folder. If your folder is in different places on different servers (or the same place on different servers that are sharing a cache) you can run into problems.
Best Answer
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:
What happens in Redis when the "Magento Cache" is flushed looks something like this...
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.