Cron cache preload once a day
-
Hi,
I’d like to refresh the whole cache (about 280 pages) once per day at 1 am. My settings are…
1) wp-cron: disabled
2) external cron 1: set to 5 minutes periods
3) external cron 2: executing cache-refresh.php at 1am each day
4) cache timeout: 90000 seconds (25 hours)
6) preload: 1500 minutes (25 hours)
7) preload mode: onMy cache-refresh.php file in the web root folder contains the following code:
<?php // Load WordPress. require( 'wp-load.php' ); // Clear cache. if ( function_exists( 'CLEAR-CACHE-FUNCTION' ) ) { CLEAR-CACHE-FUNCTION(); } // Trigger cache preload function. if ( function_exists( 'TRIGGER-CACHE-PRELOAD-FUNCTION' ) ) { TRIGGER-CACHE-PRELOAD-FUNCTION(); }Can you please…
1) Confirm the settings are ok or should I rather go with preload mode off and set the garbage collection period (4 hours maybe)?
2) If my approach is OK, can you please recommend the names of the two functions for cache clearing and preload triggering I should put to the cache-refresh.php file?Thanks, great plugin!
The topic ‘Cron cache preload once a day’ is closed to new replies.