Ecshop Shop System millions product performance optimization-Simple cache memory configuration

Source: Internet
Author: User

Ecshop Online store system for product data, templates, query can be cached, that is, some product Details page, category page, search page data after one visit, the form of a file to save, the next time someone visits the same page, no longer check the database, Direct read cache display to reduce server database pressure.

Such a practice can speed up access, reduce the waste of resources, for traffic is relatively large, or page repeatedly access hit rate is very useful, but this can only solve part of the problem, for a hundreds of thousands of commodity ecshop shop, the biggest pressure is not from natural access to traffic, But the hard-working Google bot or Bing bot, tens of thousands of of a day of high-frequency crawl, will make your system response extremely slow or even crash .

Because my ecshop is a test station, not to the actual transaction for the purpose, some settings are more exaggerated, we understand, according to the actual situation of their own adjustment bar.

The first step is simple optimization, adjust the template cache time according to the actual situation

In the program includes directory, there is a cls_template.php file, open, find the following settings, look at the time you expect to update, the default 1 hours, because my product changes are very small, set 40 hours, 144,000 seconds.

var $cache _lifetime = 144000; Cache update time, default 3,600 seconds

The second step, adjust the ecshop can occupy the memory, when the number of goods large, memory may not be enough, appropriate increase in memory

In the program includes directory, there is a init.php file, open, according to the situation of your server, the appropriate adjustment, I set the 256M, probably 50W goods no problem.

@ini_set (' Memory_limit ', ' 256M ');

The third step, adjust the SQL cache time, reduce the database query, speed up the response

In the program includes directory, there is a cls_mysql.php file, find the following settings to modify, I am cache 24 hours

var $max _cache_time = 86400; Maximum cache time, in seconds

Some of the simple settings, some help, a beginner's entry level.

Reprint: http://blog.sina.com.cn/s/blog_70ea94110101h5cr.html

Ecshop Shop System millions product performance optimization-Simple cache memory configuration

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.