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