WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Preloaded Caches Not Working (15 posts)

  1. Delete Me
    Member
    Posted 3 years ago #

    I'm getting a strange problem when preloading caches:

    I have it set to preload the most recent 400 posts, which initially works, but when it's in the process of caching them, suddenly the preloading process goes haywire. It deletes the caches of the most recent 100 posts, then resets and starts caching from the 101th post and older instead. I don't understand why it's doing this. It should simply be preloading caches from the most recent post I have, not the 101th most recent post that I published last year.

    The net result is that none of my very most recent content is cached.

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Delete Me
    Member
    Posted 3 years ago #

    I enabled debug mode to see what was going on. When it's preloading everything seems to carry on as usual, until it preloads my blog page (I split up my front page and blog page in my WordPress settings). Then this happens:

    17:57:53 /blog supercache dir: /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/blog/
    17:57:53 /blog No wp-cache file exists. Must generate a new one.
    17:57:53 /blog In WP Cache Phase 2
    17:57:53 /blog Setting up WordPress actions
    17:57:53 /blog Created output buffer
    17:57:54 /blog Output buffer callback
    17:57:54 /blog Anonymous user detected. Only creating Supercache file.
    17:57:54 /blog Writing non-gzipped buffer to supercache file.
    17:57:54 /blog Renamed temp supercache file to /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/blog/index.html
    17:57:54 /blog Sending buffer to browser
    17:57:54 /blog wp_cache_shutdown_callback: collecting meta data.
    17:57:55 /wp-cron.php?doing_wp_cron supercache dir: /home2/redcated/public_html/wp-content/cache/supercache/www.redacted.com/
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/the-quest-to-find-cowboys-in-texas
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/an-otterbox-slideout-solution-case-for-the-iphone-4
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/from-denver-to-colorado-springs-to-denver
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/well-i-wont-be-doing-that-again-for-a-while
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/its-midnight-so-its-time-for-some-hot-chocolate
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/the-new-reflex-case-for-the-iphone-44s-by-otterbox-should-you-get-it
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/im-baaaaaaaaack
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/i-really-hate-the-tsa
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/time-to-man-up-my-travel-gear-brxtravelgear
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/why-i-suck-at-writing-dating-profiles
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/everything-i-know-about-los-angeles-i-learned-from-harry-bosch-my-trip-to-blogworld-la
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/memories-nothing-but-the-memories
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/how-do-i-know-yellowstone-will-finally-erupt-and-engulf-all-of-north-america-next-week-because-ill-be-there
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/so-true-so-so-true
    17:57:55 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/planning-ahead-landing-in-denver-and-prancing-about-town-from-there

    And then it just continues going deleting about 100 caches until it finally stops. I haven't confirmed to see its attempt to preload my posts page (blog page) is what triggers this, for that I'll have to check debugging again and test one more time.

    But you can see it's inexplicably deleting 100+ of the caches it had just created not only moments before.

  3. Delete Me
    Member
    Posted 3 years ago #

    I checked it again, it appears the deletions do indeed start occurring right after it preloads my blog page. Any help appreciated!

  4. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Can you send me your wp-content/wp-cache-config.php please? Send it to donncha AT ocaoimh.ie

    That will hopefully help me track down why this is happening.

  5. Delete Me
    Member
    Posted 3 years ago #

    Sending it now!

  6. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks Lincoln - got it. How long did the preload take to run? I see that you have the preload interval set to 70 minutes. How long did the preload take to run? Did it take longer than that time?

    I think what may be happening is the preload is now taking longer (probably because of the archives getting preloaded). Can you set the preload interval to 720 minutes instead?

  7. Delete Me
    Member
    Posted 3 years ago #

    It takes about 15 minutes for the preload to complete its cycle. I'll set it to 720 minutes now to see if that helps things and report back.

  8. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    I just tried a partial preload of my own site with a short interval and it was fine. Everything in your config file looks good too.

    If you can download wp-cache-phase2.php and upload it to wp-content/plugins/wp-super-cache/, overwriting the file already there it may help spot a problem. I added the cache age limit to the "gc: deleted..." debug messages.

    The debug messages from my server were ok but maybe there's something odd happening in the code that isn't triggered on my server. :(

  9. Delete Me
    Member
    Posted 3 years ago #

    I've updated the file and did another test run. Nothing changed except the phrase "forced delete" is affixed to each deleted cache file:

    00:23:20 /blog supercache dir: /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/blog/
    00:23:20 /blog No wp-cache file exists. Must generate a new one.
    00:23:20 /blog In WP Cache Phase 2
    00:23:20 /blog Setting up WordPress actions
    00:23:20 /blog Created output buffer
    00:23:21 /blog Output buffer callback
    00:23:21 /blog Anonymous user detected. Only creating Supercache file.
    00:23:21 /blog Writing non-gzipped buffer to supercache file.
    00:23:21 /blog Renamed temp supercache file to /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/blog/index.html
    00:23:21 /blog Sending buffer to browser
    00:23:21 /blog wp_cache_shutdown_callback: collecting meta data.
    00:23:22 /wp-cron.php?doing_wp_cron supercache dir: /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/the-quest-to-find-cowboys-in-texas, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/an-otterbox-slideout-solution-case-for-the-iphone-4, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/from-denver-to-colorado-springs-to-denver, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/well-i-wont-be-doing-that-again-for-a-while, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/its-midnight-so-its-time-for-some-hot-chocolate, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/the-new-reflex-case-for-the-iphone-44s-by-otterbox-should-you-get-it, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/im-baaaaaaaaack, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/i-really-hate-the-tsa, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/time-to-man-up-my-travel-gear-brxtravelgear, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/why-i-suck-at-writing-dating-profiles, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/everything-i-know-about-los-angeles-i-learned-from-harry-bosch-my-trip-to-blogworld-la, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/memories-nothing-but-the-memories, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/how-do-i-know-yellowstone-will-finally-erupt-and-engulf-all-of-north-america-next-week-because-ill-be-there, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/so-true-so-so-true, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/planning-ahead-landing-in-denver-and-prancing-about-town-from-there, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/rockefeller-statue, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/delta-bans-jews-and-christians-from-flying-their-airline, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/miss-me-yet, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/newark-airport-parking, forced delete
    00:23:22 /wp-cron.php?doing_wp_cron gc: deleted /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/did-god-read-my-rants-on-check-in-apps, forced delete

    And so on. This mass delete is always triggered after it hits "/blog" too. I'm wondering if it's a theme conflict of some kind (I'm using the Headway theme, http://www.headwaythemes.com )

  10. Delete Me
    Member
    Posted 3 years ago #

    Maybe I can avoid this issue if the preload can somehow skip trying to preload my post page "/blog" Is there a way to limit Super Cache to only preloading single posts pages rather than posts, tags, categories and pages? I didn't have this issue in .9.9.9 so I'm wondering if this change in the preload mechanism might be a reason why this is happening.

  11. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Hopefully I've got a fix for this now. I modified wp-cache.php. Can you copy that file into your wp-super-cache/ directory and do a preload again?

    Thanks for helping me debug it!

  12. Delete Me
    Member
    Posted 3 years ago #

    You're welcome, don't mind debugging things especially if it resolves issues others might have too. Checking it now BTW, and it seems to be working again.

    16:08:36 /blog supercache dir: /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/blog/
    16:08:36 /blog No wp-cache file exists. Must generate a new one.
    16:08:36 /blog In WP Cache Phase 2
    16:08:36 /blog Setting up WordPress actions
    16:08:36 /blog Created output buffer
    16:08:37 /blog Output buffer callback
    16:08:37 /blog Anonymous user detected. Only creating Supercache file.
    16:08:37 /blog Writing non-gzipped buffer to supercache file.
    16:08:37 /blog Renamed temp supercache file to /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/blog/index.html
    16:08:37 /blog Sending buffer to browser
    16:08:37 /blog wp_cache_shutdown_callback: collecting meta data.
    16:08:38 /wp-cron.php?doing_wp_cron supercache dir: /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/
    16:08:38 /wp-cron.php?doing_wp_cron clear_post_supercache: deleting /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com//index*.html files
    16:08:38 / supercache dir: /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/
    16:08:38 / No wp-cache file exists. Must generate a new one.
    16:08:39 / In WP Cache Phase 2
    16:08:39 / Setting up WordPress actions
    16:08:39 / Created output buffer
    16:08:40 / Output buffer callback
    16:08:40 / Anonymous user detected. Only creating Supercache file.
    16:08:40 / Writing non-gzipped buffer to supercache file.
    16:08:40 / Renamed temp supercache file to /home2/redacted/public_html/wp-content/cache/supercache/www.redacted.com/index.html
    16:08:40 / Sending buffer to browser
    16:08:40 / wp_cache_shutdown_callback: collecting meta data.

    So far the mass deletions that trigger after it preloads /blog have stopped, just have to wait to ensure the caches expire without issue and are preloaded again after 70 minutes.

    What was changed if you don't mind me asking?

  13. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    There was a call to prune_super_cache() to delete the current post or page before regenerating it. Unfortunately when it hit the homepage it deleted everything underneath it too - all the cached pages!

    I changed it to delete the index*.html files instead.

    To anyone else reading this thread, try the development version, wp-super-cache.zip, as it has this fix and a couple of other fixes.

  14. Delete Me
    Member
    Posted 3 years ago #

    Thanks, I confirmed the caches are staying cached now and refreshing according to schedule again. :D

  15. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Great, will have a new release out later this week with this! Thanks again for the debug help.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic