Cron cache refresh 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 lifespan: 25 hours (as backup if 1 a.m. cron fails)
6) preload – schedule type: “same as cache lifespan”My 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( ‘WP_Optimize()->get_page_cache()->purge’ ) ) {
WP_Optimize()->get_page_cache()->purge();
}Can you please…
1) Confirm the settings are ok.
2) Suggest the content of cache-refresh.php file. It doesn’t work at the moment. If a cache preload trigger function is needed after the cache purge to start the preload, please include this one also.Thanks, great plugin!
- The topic ‘Cron cache refresh once a day’ is closed to new replies.