WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
Cache Preload Not Working (with PHP error) (18 posts)

  1. ljmac
    Member
    Posted 3 years ago #

    The cache preload feature simply isn't working for me at all - it gets stuck forever at caching 100-200 posts, although it doesn't actually cache anything at all. I'm also getting the following error in my logs:

    PHP Fatal error: Call to undefined function: esc_html() in [URL removed]/english/wp-content/plugins/wp-super-cache/wp-cache.php on line 1098

    My posts are cached in the normal fashion, however.

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

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Are you using WordPress 3.0? There's no reason that shouldn't work in an up to date version of WordPress.

  3. ljmac
    Member
    Posted 3 years ago #

    Hi Donncha,

    As indicted in my topic info, I am using 2.6.5.

  4. ljmac
    Member
    Posted 3 years ago #

    Oh, and while I'm here: why has your plug-in always been so obsessive about deleting existing cache files? I mean, if the page is updated, they will be. Otherwise, I see no reason to update them if the page isn't.

    The new preload mode is a welcome change of policy, but quite frankly, I don't know why we don't have the option to not expire and delete the cache files at all. I just don't see any reason for it, and there's many good reasons not to do this.

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Please upgrade to 3.0 or at least 2.8. Unfortunately the minimum version on the plugin hasn't been updated in a long time and it just won't work with such an old version of WP.

    Cache files are recycled because new content like that in widgets will likely be updated.

  6. fabianf1994
    Member
    Posted 3 years ago #

    I have this problem too and i'm using wordpress 3.0 .
    Every time I looked at the wp super cache configuration page it was caching from 100 to 200.

  7. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    fabian - just restart the preload. Sometimes it gets stuck.

  8. fabianf1994
    Member
    Posted 3 years ago #

    Sometimes? Around every 20 posts it gets stuck. But it's caching the posts so i'm happy ^^

  9. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    When it gets stuck it's *after* doing a 100 post job, it shouldn't get stuck after 20 posts unless your blog is very slow.

    Sometimes the scheduled job gets lost by WordPress. I've noticed it happens more if you have other plugins that schedule tasks *and* you use an object cache, at least with the Xcache object cache.

    Since removing the Xcache object cache from my blogs preloading hasn't got stuck.

  10. ljmac
    Member
    Posted 3 years ago #

    Well donncha, I followed your advice and upgraded to WordPress 3.0, which was a huge drama considering all the ancient plug-ins my blog depends on (and an out of date theme as well). Fortunately most of them work fine (and those that didn't had more modern equivalents), so in spite of all the work I'm happy with the results.

    Anyway, regarding Super Cache, the good news is that the PHP errors went away as you said they would. But like Fabian, my cache preload still gets stuck between 100-200 posts. In 2.6, it didn't actually cache anything at all, whereas it does cache some posts now (but far less than 100). Worst of all though, I couldn't cancel it - the "cancel cache preload" button never goes away, no matter how many times I tried to stop it.

    I ended up having to deactivate Super Cache and clearing its options from the database - it seems to me that the cache preload functionality is seriously broken right now.

  11. fabianf1994
    Member
    Posted 3 years ago #

    @donncha: My blog has a load time of more then 6 seconds without caching. Is that considered slow? ^^

    @ljmac: Press the "preload cache now" button and it cache's some more posts. But it still get's stuck after about 20 more posts and you have to press it again.

  12. ljmac
    Member
    Posted 3 years ago #

    Oh, I forgot to ask: what the hell is the Xcache object cache and how do I disable it? Or does the fact that I'm asking this question mean I don't actually have it?

    Also, like Fabian I don't think my blog could be considered slow - it's on a dedicated dual processor server whose loads barely go above zero most of the time with Super Cache enabled.

  13. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Fabian - that's slow, but is that for the html or is it html+images+adverts+css? Adverts might slow down your site but the html should be loaded as quick as possible.

    ljmac - preload works fine on my server on all my blogs but there might be some problem on your server. Checked the PHP error logs? any memory errors? Don't worry about xcache, if you've never heard of it you probably don't have it installed.

  14. fabianf1994
    Member
    Posted 3 years ago #

    It's the mysql server. It's extremely slow. So if the site is cached it loads in 1 second. The problem is it's shared hosting, so I can't do anything but wait and hope my hosting provider does something about it.

  15. ljmac
    Member
    Posted 3 years ago #

    Hi Donncha,

    I forgot to check for PHP errors unfortunately, and I've since cleared my logs. Anyway, I've taken all the bots out of my Super Cache settings, so now they effectively do the cache preloading for me. :-)

  16. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    haha, I should change that in the sample config file! :)

  17. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Ooer, just had a thought. If you had the plugin running in half-on mode it's a bad idea removing those bots. They'll have to stay I'm afraid.

  18. ljmac
    Member
    Posted 3 years ago #

    Hi again Donncha,

    I tried another cache preload, but with the same results as last time - and after checking, no PHP errors either. So I don't have any clue as to why it isn't working I'm afraid.

    Anyway, the bot preload method is working well. :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic