WordPress.org

Forums

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

  1. andybrna
    Member
    Posted 1 year 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 1 year 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic