I have multisite install and my Network settings seem to be applying to subsites Ok..?
There’s only one config file that is loaded by all sites so the majority of settings are applied sitewide. Look in wp-content/wp-cache-config.php on your server!
I investigated this a little bit further and it seems that settings are applied properly, but garbage collection cron job schedule is not refreshed.
In other words when I change garbage collection settings from midnight to e.g. 7200 seconds, the Cron Job will still run at the midnight if I don’t update expiration settings of sub blogs manually.
I’ll update the plugin to 1.2 and let you know if the update fixes this issue.
Updating to version 1.2 didn’t solve the issue.
I rescheduled wp_cache_gc cron job with the following function and now garbage collection settings are working fine in my sub blogs too.
function reschedule_wp_cache_gc() {
global $wpdb;
$blog_ids = $wpdb->get_col("SELECT blog_id_id FROM $wpdb->blog_ids");
if ( $blog_ids ) {
foreach ( $blog_ids as $blog_id ) {
switch_to_blog_id( $blog_id );
if ( false == wp_next_scheduled( 'wp_cache_gc' ) ) {
wp_schedule_single_event( time() + 300, 'wp_cache_gc' );
}
restore_current_blog_id();
}
}
}
add_action('init','reschedule_wp_cache_gc');
Ah, garbage collection jobs are scheduled separately on each blog.
I mark this topic as resolved, but I hope that this feature would be included to the future versions of the plugin in some form.
Scheduling garbage collection separately on each blog requires too much manual work, especially if you have a lot of blogs in your network.