Support » Plugin: WP Super Cache » [Plugin: WP Super Cache] Garbage Collection won't save correct option

  • We’ve noticed that on multisite with the default clock scheduler, garbage collection doesn’t happen, ever. On 1.0, we could change to the timer and things would work. Now if we save the timer option as your choice and navigate to another page and then back to the advanced page, our option of timer has defaulted to the clock option, which means we never run garbage collection, which is preventing our feeds from updating …. anyone else seeing this?

    Also still unable to clear cache using the admin bar ….. anyone found a fix for this yet?

    Think we’re going back to pre 1.0 version … so far that has had the fewest issues for us on ultisite.

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author Donncha O Caoimh


    That’s odd. This works fine on my site. You could edit wp-cache.php, look for text on the settings page (like “How long should cached pages remain fresh”) and then track what happens to the GC variables when you save them.

    I’m seeing the same issue.

    Plugin Author Donncha O Caoimh


    theApe – did you try debug the plugin like I suggested? It would really help.

    I’m seeing the same problem. Settings save in the admin page and display properly, but in wp-cache, the variables stay at
    $cache_max_time = 3600;
    cache_time_interval’ ] = 600;
    cache_scheduled_time’ ] = ’00:00′;

    (I set them at 82400 freshness and 07:00 once daily, as my site is fairly static.) GC is happening according to the 3600/600 settings.)

    The effect is that my site clears the cached files much more often than expected. I think the issue started with the last super cache update, but it is possible it happened with the last WP update. I did’t notice it until the last few days, though.

    Jeff H

    One more note. Even though GC appears to be running more frequently, I am getting emails 2x daily at the 00:00 UTC time. It looks like it is clearing on the clock schedule as well as the timer schedule, but I can’t be 100% sure of that.

    Hope that helps with the diagnosis.

    Thanks for a great plugin.

    Plugin Author Donncha O Caoimh


    jt70 – can you email me at donncha @ and send me ftp login details for your server? I can’t see anything obvious.

    What you’re seeing is a check on the POST variables from that form somehow failing and/or a nonce failing too. You didn’t happen to have the settings page open for an hour or two before you decided to change settings?

    i did probably, at one point, have the settings page opened for that long, but not on the most recent attempts.

    if it is the failure mode(s) you mentioned, is there an (hopefully) easy fix?

    if not, would i be able to work around the problem by changing the default variables in the wp-cache file?

    another piece of info. in the cached files list, it is adding the .need-rebuild rather quickly to the oldest of the cached pages, and giving them the same age. this last run did it within a few hundred seconds of caching.

    Plugin Author Donncha O Caoimh


    No, not an easy fix. That code shouldn’t fail and doesn’t on my own multisite network. 🙁

    If you can, look at line 1491 of wp-cache.php. That’s the chunk of code responsible.

    Those rebuild files are probably caused by comments on your site? If not enable debugging and that will record what caused them.

    Your coding is well beyond my skill, but I did find the section you mentioned. I see all the default settings loaded. 600/3600/00:00

    Is the settings page supposed to update these? I wouldn’t think so.

    Of note, I set the time to 0 to disable the GC, and it did not stop it.

    I changed the setting for the comments refresh to current page only to see if that would solve the needs-rebuild problem.
    I would have no idea how to enable debugging. Again, beyond my skill. I did a quick search, but the info I found seems dated.

    I’m not above doing a workaround. Would updating the defaults in the wp-cache fix my issue without causing damage? If the problem is not widespread, it is likely just some kind of conflict on my site. No sense in wasting your time on it if that is the case.

    By the way, thanks for all the help and follow up.


    I think you were onto it when you mentioned comments. Strange behavior. When I get a trackback moved into the spam folder, it deletes all rebuilds and creates new rebuilds from the non-rebuilt files in the cache list.

    When I post a comment, it does’t do anything. When I move that comment to trash, it also does the rebuild.

    When I set the time-schedule for GC, the emails seemed to be coming at the right time, so I am wondering if this is comment related after all.

    Unchecking the rebuild button doesn’t seem to change this behavior.



    After messing around with things some more, it appears that any comment/trackback that hits the spam list, deleting a comment, or updating a post all causes the cache to clear. I think the GC is actually working OK. It was just the repeated clearing of the cache due to these actions that made me think that the scheduling was not working for me. (Please let me know if you want me to move this issue to a new thread).

    This clearing happens regardless of which setting I have for “Clear all cache files when a post or page is published or updated.” or “Only refresh current page when comments made.”

    Other checkboxes seem to work. For example, if I check rebuild cache, when it clears, I get the rebuild files. Without the check, I don’t.

    Sorry to have you chasing this in the wrong direction.

    Plugin Author Donncha O Caoimh


    Thanks Jeff for tracking this so closely. I have verified that the garbage collection does happen too often if you have selected the clock method. It still uses the timer.

    I’ll look into the other cache clearing thing afterwards.

    No problem. You are actually helping me.

    Let me know if you need any more info.

    I had a similar experience with garbage collection. I would set the the collection on timer, then later find out that it was being reset back to clock. The problem seems to have gone away after I deleted the sample configuration file that comes with the installation. The code uses this file if no configuration exists. Since I deleted the sample, I have not had a occurrence of the problem. Just another factor to consider when debugging.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘[Plugin: WP Super Cache] Garbage Collection won't save correct option’ is closed to new replies.