Using Redis as Magento Cache backend


Out of the box Magento supports a few cache backend thanks to the use of Zend Framework Cache including File System, APC and Memcached. Every cache backend comes with it’s ow set of advantages and disadvantages scalability & tagging being a pain on most of them. Enter Redis, as of Magento CE 1.8 and EE 1.13 the integration between Redis and Magento is already included.

Why Redis ?

Redis is an open soure (BSD) advanced key-value store and can be used in Magento for cache and session storage.
Some of the benefits of using redis in a magento implementation includes:

  • Redis supports multiple databases that use the same server instance so you can use different databases for the Magento cache, full page cache (EE only), and sessions without starting many processes listening on different ports.
  • Redis is easy to setup and configure
  • Redis supports compression
  • Redis can be used for PHP session storage.
  • Redis supports on-disk save and master/slave replication.

Configuring Magento To Use Redis

Since the integration between Magento & Redis is already included as mentioned above you all you need to to is install & configure the redis server & configure Magento.
To enable Magento to use redis do the following.

  1. Enable the Cm_RedisSession module (If you plan on using Redis to store PHP session data)
  2. Modify app/etc/local.xml
    Sample configuration for redis cache & session management is included in app/etc/local.xml.additional open the file and copy the sections you need into your app/etc/local.xml
  3. Flush the magento cache.

That is all there is to implementing Redis with Magento as a cache backend. I hope you found the article useful. In case you require any help with your Ecommerce Development or need specific help with Magento Development we’d be happy to help.

wikusUsing Redis as Magento Cache backend
Share this post

Join the conversation