Skip to:

Convert WP Super Cache plug-in for bbPress ?

  • Does anyone have links or documents on how I can convert WordPress’ Super Cache plugin for use with bbPress?

    Or, has it already been done?

Viewing 25 replies - 1 through 25 (of 38 total)
  • have you asked the maker of the plugin?

    Super Cache would help for slow-updating forums… but if you get a lot of traffic, I don’t think it’d really end up caching very much? Blogs don’t get nearly as many updates, so I could see it being a lot more helpful there…

    Anyway to answer your question, I haven’t seen a guide on converting WordPress plugins to bbPress ones… that would be really useful!

    Sam Bauers


    Output caching is probably totally unnecessary for 99.9% of bbPress installs.

    There are a few reasons but primarily:

    1. Most of the users on your site are probably logged in, and that means they can’t get cached versions.

    2. bbPress is pretty light on MySQL queries.

    At Automattic we have never had any need to run any caching besides MySQL query cache, and sometimes we don’t even use that. Although our hardware might be better than most, we also have more traffic than most too.


    I didn’t get it. I actually understand that caching for a forum script is not a good idea but I didn’t get anything from your 1st point. Single topics pages can be cached untill a new response comes in. What say? As per me, that will actually help even having some overhead as there is a great difference between the topics answers and views.

    Sam’s first point, about logged in users … With wp-super-cache, if you’re logged in, you don’t get cached pages. So on a forum, most folk are logged in, thus defeating the purpose.

    Single topics pages can be cached untill a new response comes in.

    That would be new and different, and IIRC not a part of bog-standard WP-Super-Cache, so that’s a pretty hefty write.


    Why logged in users can’t have cached pages? (This is what I am not able to understand)

    @ashfame I didn’t say they couldn’t, I said they didn’t. I chose that word on purpose :)

    The way that WP-Super-Cache was originally written, logged in users DO NOT get cached pages. Now I understand that Donncha added in a toggle to turn that option on and off recently, but I’ve not used it and I’m not sure exactly what that does.

    As for ‘why’ logged in users don’t get cached pages (historically), well, Donncha says this:

    If you’re logged in or have left a comment you’ll never see a super-cached page. You’ll see plain old regular WP-Cached pages instead. That’s not so bad since a huge majority of your visitors will never leave a comment.



    You can get a 25% speed boost or more by running 0.9 instead of 1.0 depending on how many simultaneous connections you are serving.

    1.0 uses 50% more code and several more queries per page when generating the same content.

    Sam Bauers


    and several more queries per page when generating the same content

    I’m working on fixing that now where possible.


    >> “have you asked the maker of the plugin? “

    I have and Donncha (SuperCache creator) informed me that he doesn’t use bbPress, so he won’t be porting the plug-in.


    Since you’re so adament about how 1.0 is so much slower than 0.9 … and also that you probably understand creating plugins better than anyone else here, except for Sam of course, would you then take on the task of converting Donncha WP Super Cache plug-in for bbPress?

    Isn’t that too much of a favour? I wish I was that much skilled at the moment, I wouldn’t have cared about my exams next week and would have start working on it right away.

    @ashfame – i just graduated :D …….. which is why im bugging the hell out of everyone here. got all the time in the world… until i find a job, bit like finding a needle in a haystack though.

    @frooyo…. CK doesnt even have the time to make BB-Attachments compatible with RC1+ (i asked earlier) which is far more important than caching one of the litest forums available. …


    Since you have some free time (and it sounds like you understand the inter workings of bbPress), would you mind taking a shot at converting the WP Super Cache plugin for use with bbPress :) :) :)

    Again, the key here is that it really only needs to work for non-logged in users since they will generate the most traffic (most load on the server).

    install the new RC3, which is said to have increased caching or whatever… do some testing.



    It’s not increased caching, it’s just reducing queries closer to what 0.9 does.

    1.0 RC3 is still slower than 0.9


    Like massbase said, the blog announcement from Sam says:

    >>”Some new issues came up around WordPress integration, caching and SQL query performance which were simply too important to leave out of the final 1.0 release.”

    That seems to indicate to me that Sam did add in some type of caching mechanism into bbPress 1.0

    bbPress 1.0 Release Candidate 3

    Did I misinterpret what Sam wrote?

    Sam Bauers


    1.0 RC3 is still slower than 0.9

    And will probably remain that way due to the increased demands of the WP_Taxonomy structure.

    Ryan Hellyer


    Is it not possible that adding caching will actually put MORE load on the server? Writing new .html files every time a new post is made could potentially slow things down, not speed it up. With blogs it makes some sense as there are many more views of a page than there are posts written, but with a forum that is not necessarily the case.



    Caching will help for non-members, especially considering that a more popular site has a few dozen bots crawling around it at any given time. But yes, it will have to generate a new file for each page.

    However even without wp-super-cache it’s possible to cache parts of pages for all members, especially worthwhile on parts that use a whole bunch of CPU cycles to generate each time.

    I wrote some code awhile back to cache the tag clouds, since they are not filtered by logged-in/out and remain static until a tag is added or deleted. The tag cloud took an average of 10-20 ms out of 120 ms to generate on the front page so the savings were worthwhile.


    I would like to attempt to convert WordPress’ SuperCache plug-in to bbPress.

    I’ve never created a plugin before.

    Does anyone has any reference docs or pointers on how I would create the hooks needed for SuperCache on bbPress?

    Frooyo – I think you are going to set a record for posting the same thing over and over! :-)


    If you have some info on how I would create the SuperCache “hooks” into bbPress, that would be greatly appreciated.



    frooyo, the fact you have to ask how indicates you won’t be able to do it

    It will take someone with experience quite a bit of work and testing to accomplish.

    It’s not a trivial conversion like some other plugins.


    What’s so difficult about it?

    Let’s assume we only output cache for non-logged in users, just like SuperCache.

    You only need 2 hooks.

    1. A hook after a POST is submitted to re-cache both the frontpage and topic page

    2. A hook before rendering both the frontpage and topic page to check to see if the cache is present.

    Am I missing something here?

    @frooyo if you dont know how to program a plugin … don`t say your going to do something that some people have tried before

    if it was easy it was done already

Viewing 25 replies - 1 through 25 (of 38 total)
  • You must be logged in to reply to this topic.
Skip to toolbar