Search…

X3 Photo Gallery Support Forums

Search…
 
zeroday
Topic Author
Posts: 16
Joined: 09 Mar 2008, 16:16

Page Cache - crontab

26 Jan 2024, 03:04

I would love it to have an option to be able to delete the page cache through contrab
this would make it possible to add new albums uploaded automatically from ie. my iphone to X3
is this available?


..proud 16 years user .. ;-)
 
User avatar
mjau-mjau
X3 Wizard
Posts: 13998
Joined: 30 Sep 2006, 03:37

Re: Page Cache - crontab

26 Jan 2024, 22:38

zeroday wrote: I would love it to have an option to be able to delete the page cache through contrab
this would make it possible to add new albums uploaded automatically from ie. my iphone to X3
is this available?
There is perhaps a better way to do this. X3 invalidates cache whenever the the mtime (modified time) on the main /content/ dir is updated. This is how cache invalidation is handled from the X3 control panel, when something changes. There is also a backup mechanism, to update the time or writing into a file config/touch.txt. As soon as either /content/ or /config/touch.txt is updated, visits to your X3 website will cause new pages to get created also.

So if you have some CRON task, you could just update either /content/ or /config/touch.txt whenever required. From command-line, that would be a simple "touch $path" command.

You could also delete the page cache, but this seems is more complicated and serves the same purpose.
zeroday wrote: ..proud 16 years user .. ;-)
Wowzor 🤩