To help increase the speed of Magento page loads, it is recommended to use the Memcached support built within Magento. Memcached is a high-performance memory object caching system designed to speed up dynamic content websites. Magento supports Memcached for caching many objects, but Memcached in Magento is not enabled by default and requires some simple changes to your local.xml file.
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 to allow any external sources to 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:
Open the file and find the following line of code (usually this is also the end of the file):
</config>
Right before this line add the following lines:
<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[www.xeonbd.com]]> </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>
After that save the file. The following screenshot shows how to edit the file via the cPanel File Manager -> Code Editor Tool:
That’s it – your Magento application is now correctly configured. From now on the e-commerce app will use Memcached to cache certain API calls, database calls, and objects.
Magento can be hosted in XeonBD’s Shared Linux, Shared Windows, VPS, and Dedicated Server hosting plan and you can choose any of the hosting services of XeonBD that meets your resource requirement for Magento hosting.
Still confused about where to start feel free to reach us at sales@xeonbd.com or call us at +889638-750750.