• I’ve found garbage collection has stopped working entirely at some point, and as far as I can tell from the debug logs it seems to be because supercache only tries to gc the blogs/blog directory (which doesn’t exist).

    From the debug log:
    ****
    23:56:21 5344 /wp-cron.php?doing_wp_cron maybe_stop_gc: GC flag not found. GC will go ahead..

    23:56:21 5344 /wp-cron.php?doing_wp_cron wp_cache_gc_cron: Set GC Flag. (G:\vhosts\sitename.com.au\httpdocs\wp-content/cache/sitename.com.au_wp_cache_gc.txt)

    23:56:21 5344 /wp-cron.php?doing_wp_cron Cache garbage collection.

    23:56:21 5344 /wp-cron.php?doing_wp_cron Cleaning expired cache files in G:\vhosts\sitename.com.au\httpdocs\wp-content/cache/blogs/blog/
    *****

    And that’s it – it makes no attempt to gc the supercache folder apparently. Is this a config thing on my part somehow?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m running WordPress Multisite and am using domain mapping (and have the WP Super Cache domain mapping plugin enabled) an am having the exact same problem. This had been working up until one of the most recent updates.

    There seems to be something wrong with the plugin that’s causing this, but for now I fixed it by adding this (as a mu-plugin) to my site:

    function my_wp_cache_gc_cron() {
    	global $blog_cache_dir, $cache_path;
    
    	$blog_cache_dir = $cache_path . 'supercache/' . $_SERVER['HTTP_HOST'] . '/';
    }
    add_action('wp_cache_gc','my_wp_cache_gc_cron', 1);

    Thank you @laubsterboy! Your fix solved a long-standing issue for my multisite.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘GC not working any more’ is closed to new replies.