Integrate Memcached in Magento

Saturday, March 17, 2012
Integrate memcache in your magento application which will increase the speed of Magento page loads as much as possible..In this this article i will tell you how you can do it.
Magento has built in support of memcached ,you only need to enabled it by making some changes in the configuration file.
Memcached is a high-performance memory object caching system that is designed to speed page loads on dynamic content websites. Magento supports Memcached for caching many objects, but it is not enabled by default and will require some simple changes to your configured local.xml file to use.

First, be sure that Memcached is installed and running on your server. It by default listens on port 11211. A ‘netstat’ will verify that you do indeed have a Memcached listening socket on port 11211 indicating that is it running. Configuring Memcached to listen on localhost is recommended as it would be a security risk allowing any external sources access Memcached directly if it were to be listening on an external ip that wasn’t firewalled.

You also need to be sure that Memcached support is loaded into PHP. A view on a phpinfo() page can verify this, just look for the ‘Memcache’ block in the phpinfo and be sure it is ‘enabled’.

To enable Memcached within Magento, you will need to add the following block of code to your app/etc/local.xml file: