How to Flush/Rebuild Config Cache on High-Performance Magento Sites

cachemagento-1.8magento-1.9performanceredis

If we flush the config cache, the cache is build up by the customer in the frontend. The problem is that a lot of customer build the same cache and it took a lot of server resources.

Is there a smart way to build the config cache?
Something like, build a parallel config cache and switch it with the real cache keys?
Or just rebuild every config cache key in the adminhtml without flushing it?

We are using Redis as backend cache.

Edit: I figured out, that it's just the case if the cache key CONFIG_GLOBAL_STORES_[A-Z]_[A-Z] is flushed.

Best Answer

We figured out that magento set a cache key prefix based on the path of the magento etc folder. We have a multiple server and each server has a release folder structure for deployment. That means the path of the etc directory is different on every server, so every frontendserver has/build his own config/block cache. The solution was to set a hardcoded prefix in the local.xml (global/cache/prefix) and now the cache flush is very smooth :)

Related Topic