How to disable the Ecshop cache, how to turn off the ecshop cache

Source: Internet
Author: User


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

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.