The ECshop e-commerce system can cache product data, templates, and queries. This means that after an initial visit, data from product detail pages, category pages, and search pages is saved as files. The next time someone accesses the same page, the system reads directly from the cache instead of querying the database again, reducing server database load.
This approach indeed speeds up access and reduces resource waste. It is particularly useful for sites with high traffic or a high cache hit rate for repeat page views. However, this only solves part of the problem. For an ECshop store with hundreds of thousands of products, the biggest pressure does not come from organic user traffic, but from diligent bots like Google Bot or Bing Bot. Their high-frequency crawling, reaching tens of thousands of hits a day, can make your system extremely slow or even crash it.
Since my ECshop is a test site and not intended for actual transactions, some of my settings are quite aggressive. As you all understand, adjust them according to your own situation.
Step 1: Simple optimization — Adjust the template cache time based on your situation
In the program’s includes directory, there is a file called cls_template.php. Open it and find the following setting item to set your desired update interval. The default is 1 hour. Since my product changes are minimal, I set it to 40 hours, which is 144,000 seconds.
var $cache_lifetime = 144000; // Cache update time, default 3600 seconds
Step 2: Adjust the memory limit ECshop can use. When you have a large number of products, memory may be insufficient, so increase it appropriately
In the program’s includes directory, there is an init.php file. Open it and adjust the setting according to your server’s situation. I set mine to 256M, and it handles about 500K products without issues.
@ini_set('memory_limit',
Step 3: Adjust the SQL cache time to reduce database queries and speed up response times
In the program’s includes directory, there is a file called cls_mysql.php. Find the following setting item and modify it. I cache for 24 hours.
var $max_cache_time = 86400; // Maximum cache time, in seconds
These simple settings can help to some extent, considered beginner-level stuff
Source: http://blog.sina.com.cn/s/blog_70ea94110101h5cr.html