WordPress.org

Ready to get started?Download WordPress

Forums

Batcache
batcache is not working (19 posts)

  1. alternico
    Member
    Posted 2 years ago #

    Hi all,

    I'm trying to install batcache, I have configured it but I'm not able to see any statistics in my pages header.

    Have you ever had the same problem?
    Thanks,

    http://wordpress.org/extend/plugins/batcache/

  2. Patrick Nommensen
    Member
    Posted 2 years ago #

    Hi there,

    First off that plugin hasn't been updated in more than a year and according to the plugin page isn't compatible with 3.2.1.

    If you want to get a really fast website, and your website isn't huge with thousands of pages, I would recommend the combination of Hyper Cache and DB Cache Reloaded. Together they have my website faster than 94% of websites out there according to the Pingdom Tools.

  3. Vitor Carvalho
    Member
    Posted 2 years ago #

    This plugin is working for me if APC is intalled in your server and this plugin http://wordpress.org/extend/plugins/apc/ is activated :)
    hope it works for you!

  4. styledev
    Member
    Posted 2 years ago #

    This is because the advanced-cache.php throws an error on line 248 because it is looking for $batcache->genlock and seeing if it is equal to 0 (false).

    To fix this updated the IF statement abvove it on line 244 to this:

    // If the document has been updated and we are the first to notice, regenerate it. *Adde else to fix Debug error
    if ( $batcache->do !== false && isset($batcache->cache['version']) && $batcache->cache['version'] < $batcache->url_version )
    	$batcache->genlock = wp_cache_add("{$batcache->url_key}_genlock", 1, $batcache->group);
    else  $batcache->genlock = 0;

    Also make sure to set the $debug variable to true on line 29. Otherwise it will skip the output. It is, by default, set to false.

  5. Pothi
    Member
    Posted 2 years ago #

    First off that plugin hasn't been updated in more than a year and according to the plugin page isn't compatible with 3.2.1.

    Correct. There are no recent stable releases. But, there are a few fixes that can be found in the development log of Batcache plugin. Most importantly this plugin doesn't break anything during upgrade of WP core or plugins. It just works (for me, of course)!

  6. styledev
    Member
    Posted 2 years ago #

    I forked the plugin on GitHub and applied the code above I posted and submitted a Pull Request. Hopefully the author will integrate that soon. The reality though is the plugin does work it just doesn't show the output that it says it does for you to easily confirm that it is working.

  7. Patrick Nommensen
    Member
    Posted 2 years ago #

    How does this plugin compare to ones like hyper cache and quick cache?

  8. Pothi
    Member
    Posted 2 years ago #

    I forked the plugin on GitHub and applied the code above I posted and submitted a Pull Request. Hopefully the author will integrate that soon. The reality though is the plugin does work it just doesn't show the output that it says it does for you to easily confirm that it is working.

    I'm sorry I couldn't understand. But, I hardly work with the plugin code. So, obviously I can not understand your code. I only wanted to answer the previous question in this thread.

    Thanks for the updated code, though. I will definitely use it when I have an issue with the plugin. The plugin may be working for me, because I use APC as backend, instead of Memcached.

    Thanks again for your input.

  9. styledev
    Member
    Posted 2 years ago #

    @pnommensen I haven't used those two plugins before but Batcache is what WordPress.com uses.

    @Pothi Kalimuthu Batcache does work, and works with the latest version of WordPress. What id doesn't do is output the code in the <head> tag of the site that shows the statistics. Which is what the instructions tell you to look for to confirm that the plugin works. Ironically, this is the only aspect of it that is broken. It works perfectly fine with Memcached.

  10. Pothi
    Member
    Posted 2 years ago #

    Thanks styledev for more information and help.

  11. Israel Curtis
    Member
    Posted 1 year ago #

    I still get no debug output, even with the mentioned fix and $debug = true...

    on WP 3.3.2, I have APC active, the apc object-cache.php and advanced-cache.php installed correctly, the batcache manager plugin, and WP_CACHE set true in wp-config...

    How can I tell if batcache is working without that debug output?

    And is it normal to see my TTFB increase with this setup?

  12. Pothi
    Member
    Posted 1 year ago #

    There might be an incompatibility issue with a plugin currently being activated (or with the theme). You may want to deactivate all the plugins (or switch back to the default theme) to see, if batcache works. Then you may activate each plugin one by one to figure out the actual plugin that has conflicts with batcache.

    I haven't checked TTFB after activating batcache. But, I guess, it is unusual to see an increased TTFB.

  13. Israel Curtis
    Member
    Posted 1 year ago #

    Tried completely vanilla fresh 3.3.2 install, only plugins are the apc object-cache and batcache's advanced-cache. Theme is twentyeleven. Patched batcache as indicated by styledev.

    Running PHP 5.2.12, with APC 3.0.19.

    Still no debug batcache output in source...

    I've found TTFB almost always goes up when using APC at all. I understand why APC is supposed to speed things up, and it probably does help following operations, but each page load is easily 1-2 seconds longer simply from TTFB (server taking that long just to start a response. After that, everything comes thru very quick...

  14. Pothi
    Member
    Posted 1 year ago #

    Oh, if a default installation doesn't work with batcache either, then I could not guess any other reason for this behavior. I'm using PHP 5.3.x, and APC 3.1.x though.

  15. Israel Curtis
    Member
    Posted 1 year ago #

    Hmmm.... maybe my apc is too old? (though he says it would work..)

    Jaquith sez:

    Yes! APC 3.1.1+ supports incrementers and handles its own cleanup of expired objects, so it works just fine for Batcache. Lower versions of APC will work, but the hits trigger will be disabled.

  16. Mark Jaquith
    WordPress Lead Dev
    Plugin Author

    Posted 1 year ago #

    Make sure you're using the latest version of the APC object cache backend. 2.0.3 as of this writing. It should be in your wp-content directory, not in your plugins directory.

  17. Israel Curtis
    Member
    Posted 1 year ago #

    just checked - using 2.0.3

    only thing somewhat out of date is my APC is less than 3.1.1

  18. Steve Blackwood
    Member
    Posted 1 year ago #

    Assuming this is what you mean by debug output in in the head:

    <--
    generated in 0.081 seconds
    15980 bytes batcached for 300 seconds
    -->

    Then it's working great here.

    Mark's APC Plugin Version 2.0.3
    APC Version 3.1.6
    PHP Version 5.2.17

    Loving it! Fastest my site has ever been. If there's supposed to be other output in the header, then nope.

  19. ralcus
    Member
    Posted 1 year ago #

    the newest version of the plugin has styledev's fix in it and debug mode is turned on by default so it will always output the message just above the header...

    Unless you are logged into the site as administrator (aka cache exempt visitor), something i just realized after some head scratching and then finally actually reading the code

    // Never batcache when cookies indicate a cache-exempt visitor.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags