Overview
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.
- Enable the Cm_RedisSession module (If you plan on using Redis to store PHP session data)
- 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 - 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.
Join the conversation
You must be logged in to post a comment.