We often hear complaints about how Magento is slow and performs poorly. Developers know, however, that performance is relative and that we can do a number of things to speed up a Magento site.To increase the speed of magento page loads as much as possible, it is recommended to enable memcached within magento.
In this blog, i’ll explain about how to configure your magento application to use memcached. First of all, be sure that memcached is installed and running on your system. You can verify it by simply running a ‘netstat’ command for port 11211 which is the default port for memcached. To read more about memcached installation, follow the link :- http://cloudkul.com/blog/cache-mysql-data-using-memcached-a-more-practical-approach-to-memcached/
Magento application natively supports memcached, this means that you just need to enable this option in local.xml file.The file local.xml is in your public_html/magento/app/etc folder. To enable Memcached within Magento, you will need to add the following block of code to your app/etc/local.xml file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<cache> <backend>memcached</backend><!-- apc / memcached / empty=file --> <memcached><!-- memcached cache backend related config --> <servers><!-- any number of server nodes can be included --> <server> <host><![CDATA[127.0.0.1]]></host> <port><![CDATA[11211]]></port> <persistent><![CDATA[1]]></persistent> </server> </servers> <compression><![CDATA[0]]></compression> <cache_dir><![CDATA[]]></cache_dir> <hashed_directory_level><![CDATA[]]></hashed_directory_level> <hashed_directory_umask><![CDATA[]]></hashed_directory_umask> <file_name_prefix><![CDATA[]]></file_name_prefix> </memcached> </cache> |