WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Global cache garbage collection options for WPMU (2 posts)

  1. andybrna
    Member
    Posted 5 months ago #

    Hi,

    I have an issue with a multisite installation with a couple of thousand sites which is configured with Super Cache. The issue is that by default each site has no garbage collection scheduled. Is there a better way of globally enabling cron garbage collection for each site than doing it by hand site by site or hacking the wp_options for each site?

    thanks for any pointers! Andy.

    https://wordpress.org/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 5 months ago #

    You could write a plugin that schedules the garbage collection:

    if ( !wp_next_scheduled( 'wp_cache_gc' ) )
        wp_schedule_single_event( time() + 60, 'wp_cache_gc' );

    Put that somewhere where it will be executed when users login to their dashboard and it will schedule the GC for 60 seconds later on that blog.

Reply

You must log in to post.

About this Plugin

About this Topic