Knowledgebase:
How to configure Magento to use Memcached
Posted by Bill Williams on 10 February 2016 10:19 AM

In this tutorial we will explain how to configure your Magento application to use Memcached.

The Magento application natively supports Memcached.

This means that you just need to enable this option. In order to do this you have to edit the Magento XML configuration file - local.xml.

This file is stored inside the web root folder. For example, if your website is accessible at:

http://domain.com/magento

this means that the local.xml file is in your public_html/magento/app/etc folder. In order to edit the file you can use the cPanel File Manager.

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[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>

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.

(0 vote(s))
Helpful
Not helpful

Comments (0)
Post a new comment
 
 
Full Name:
Email:
Comments:
CAPTCHA Verification 
 
Please enter the text you see in the image into the textbox below (we use this to prevent automated submissions).