Familiar with the old webmaster Ecshop know, Ecshop is a caching mechanism.
The caching mechanism of ecshop can reduce the probability of ecshop repeatedly reading the database to some extent, reduce the server burden and improve the access speed.
But to enable the caching mechanism, some novice webmaster also has a disadvantage. I met a lot of novice webmaster often asked, I clearly modified what what, why the front desk has not changed, this is the cache in mischief, generally to the background to clear the cache can be.
For these reasons, some webmasters are wondering if they can "disable the Ecshop cache and turn off the ecshop cache"? The answer is yes.
Here's how to disable the Ecshop cache, how do I turn off the ecshop cache? ”
Ecshop Cache is divided into two kinds, one is smarty page cache, the other is the cache of SQL query results.
Both of these caches are saved under the Templates/caches/folder.
As long as we shut down the two caches separately, we can completely disable the Ecshop cache.
Of course you can also close one of them according to your own needs.
1. Close the Smarty cache:
Open the includes/cls_template.php and find the following paragraph
if (file_put_contents ($hash _dir. ‘/‘ . $cachename. '. php ', ' <?php exit;? > '. $data. $out, lock_ex) = = = False)
{
Trigger_error (' can\ ' t write: '. $hash _dir. ‘/‘ . $cachename. '. php ');
}
Comment out this section and change it to
/*
if (file_put_contents ($hash _dir. ‘/‘ . $cachename. '. php ', ' <?php exit;? > '. $data. $out, lock_ex) = = = False)
{
Trigger_error (' can\ ' t write: '. $hash _dir. ‘/‘ . $cachename. '. php ');
}
*/
2. Close SQL query Result cache
Open includes/cls_mysql.php
Found it
var $max _cache_time=3600;//Maximum cache time, in seconds
Switch
var $max _cache_time=0;//Maximum cache time, in seconds
After the above changes, the Ecshop page cache and the data query cache have been disabled, so that when you make any changes, the foreground can immediately reflect the latest changes, but the pressure on the server is a little bit larger than the cache before disabling.
Each has the pros and cons, own choice bar.
How to disable the Ecshop cache, how to turn off the ecshop cache