Hi longnha,
What actions do you take during your cron jobs? I’d like to know which options you have checked in the purge rules settings as well.
Thanks,
Kevin
Hi Kevin,
Purge rule: http://imgur.com/a/tgySK
Active cron via phpadmin: http://imgur.com/yTtDKuG
Thanks.
Also, each time the issue happen, I notice the homepage response header:
vary:Accept-Encoding
x-litespeed-cache-control:public,max-age=1800
x-litespeed-tag:B1_F,B1_
It different with normal status:
server:LiteSpeed
status:200
vary:Accept-Encoding
x-litespeed-cache:hit
Thank you.
So I believe that you might have something updating during the cron job. For whatever reason, everything gets purged when the cron job hits.
If you are comfortable editing code, please go to our file litespeed-cache/includes/class-litespeed-cache.php
Inside, there is a function add_purge_tags. At the top of the function add the following:
error_log('purge tags ' . $tags);
So that it looks like:
private function add_purge_tags($tags, $is_public = true)
{
error_log('purge tags ' . $tags);
//TODO: implement private tag add
if (is_array($tags)) {
$this->pub_purge_tags = array_merge($this->pub_purge_tags, $tags);
}
else {
$this->pub_purge_tags[] = $tags;
}
$this->pub_purge_tags = array_unique($this->pub_purge_tags);
}
Once this line is added, an error log should be printed out every time something is purged. You can test this by pressing the purge front page button in the litespeed cache management page. Once confirmed, wait for the cron to activate, and check the error log – there should be new messages. We’re interested in what tags are purged.
Thanks,
Kevin
Hello,
Yes, I edit the file and add the line. Where can I check the error log please?
Thanks.
There are multiple possibilities, all depending on how your server was installed.
The first place to check is your where your wordpress’s index.php file is, so if it is at /home/user/public_html/index.php, look for /home/user/public_html/error_log.
Else you could have your own error log, /home/user/logs/error_log.
Else it could be at /usr/local/apache/logs/error_log or /usr/local/lsws/logs/error.log