Magento how to enable Memcached cache settings

Source: Internet
Author: User
Tags memcached


Native supports using Memcached cache, but needs to be set in the configuration file.

Put the code on (app/etc/local. xml ):

<Global>
...
<Cache>
<Auto_refresh_fast_cache> true </auto_refresh_fast_cache>
<Backend> memcached </backend>
<Backend_options>
<Servers>
<Server>
<Host> localhost <Port> 11211 </port>
<Persistent> true </persistent>
<Weight> 1 </weight>
<Timeout> 1 </timeout>
<Retry_interval> 15 </retry_interval>
</Server>
</Servers>
</Backend_options>
</Cache>
...
</Global>
 

The most attractive part of Memcached is its distribution, which can achieve load balancing and ease the problem of instantaneous traffic. Since it is distributed, you can certainly use multiple servers. Under the servers node, you can add multiple server nodes to implement the configuration of multiple servers.

If Memcached is enabled in the background before Memcached is set, an error may occur when you access the website after Memcached is enabled. This is caused by a different default Cache format than Memcached. In general, you only need to clear the files in the var/cache directory to solve this problem.

Although Memcached can improve the running speed to some extent (because it saves the cache to the memory), its main function is distributed load balancing. Memcached is unnecessary if the site has low instantaneous access traffic and SSD is used.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.