Hello @thomasv85
Thank you for your inquiry and I am happy to assist you with this.
To reliably schedule something you should use Unix corn, as this depends on your control panel you should reach out to your host for assistance in creating a cron that will call function w3tc_flush_all every 4 hours in your case.
Thanks!
I can make a cron job, but what would be the link for the flush?
Do you have a example?
Hello @thomasv85
The function is in /wp-content/plugins/w3-total-cache/w3-total-cache-api.php on line 233:
/**
* Purges/Flushes everything
*/
function w3tc_flush_all( $extras = null ) {
$o = \W3TC\Dispatcher::component( 'CacheFlush' );
$o->flush_all( $extras );
}
Thanks!
do you have a example for the cronjob?
so a link or a code that i can use in the cronjob…
something like:
59 23 * * * curl –header ‘Cache-Control: max-age=0’ http://your-domain.com/wp-content/themes/your-theme/3858f62230ac3c915f300c664312c63f.php >> /home/myuser/w3tc-flush.log
Do you have a cronjob example?
I don’t know what you mean with the code..