Purge Cache at 00 o'clock

#1
Salutations,
as the title suggests, would it be possible to trigger those 3600 seconds exactly at **: 00:00..?

Thanks in advance to anyone who will take a moment to answer me.
 

serpent_driver

Well-Known Member
#3
Yes, it is possible, but with a max delay of ~ 1 min. This can be done with cURL and a cron that checks every minute if x-litespeed-cache header is miss and if header is miss you can be notified per email or almost everything you want to.
 
Last edited:
#4
use cron job to clean lscache dir
Obviously I wanted to avoid cleaning, as there was already a rather short timeout
Yes, it is possible, but with a max delay of ~ 1 min. This can be done with cURL and a cron that checks every minute if x-litespeed-cache header is miss and if header is miss you can be notified per email or almost everything you want to.
I have a timeout on a module set to 3600 seconds.
The module predicts delivery time, so it works fine when the hours tick, while the timeout expires based on when the cache was created.
I don't think I would be able to solve with a cron.
 

serpent_driver

Well-Known Member
#5
Maybe there is a much simplier solution, but it depends on this "module" you are talking about. It must trigger itself and if specified time passed by it does a request to an almost empty PHP file that contains only a header to purge the cache.

Code:
header("X-LiteSpeed-Purge:*"); // purges the entire cache and should be specified if necessary
That's it.
 

AndreyPopov

Well-Known Member
#6
I have a timeout on a module set to 3600 seconds.
timeout or cache TTL (Time To Live)?

what you want:
- Purge cache
- or check if cache exist

if you want to regenerate cache than start crawler by cron, for example, every 30 minutes

if "hit" - item passed
if "miss" - cache created and sets to "hit"
 
Top