Info
- 39 posts
- 12 voices
- Started 2 years ago by frooyo
- Latest reply from frooyo
- This topic is not resolved
Convert WP Super Cache plug-in for bbPress ?
-
- Posted 2 years ago #
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?
-
- Posted 2 years ago #
have you asked the maker of the plugin?
-
- Posted 2 years ago #
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!
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
@Sam
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. -
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
@Ipstenu
Why logged in users can't have cached pages? (This is what I am not able to understand) -
- Posted 2 years ago #
@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.
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
and several more queries per page when generating the same content
I'm working on fixing that now where possible.
-
- Posted 2 years ago #
@Ramoonus
>> "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.
@_ck_
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?
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
@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. ...
-
- Posted 2 years ago #
@massbase
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).
-
- Posted 2 years ago #
install the new RC3, which is said to have increased caching or whatever... do some testing.
-
- Posted 2 years ago #
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 -
- Posted 2 years ago #
@_ck_
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
http://bbpress.org/blog/2009/06/bbpress-10-release-candidate-3/
Did I misinterpret what Sam wrote?
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
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.
-
- Posted 2 years ago #
All
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?
-
- Posted 2 years ago #
Frooyo - I think you are going to set a record for posting the same thing over and over! :-)
-
- Posted 2 years ago #
@johnhiler
If you have some info on how I would create the SuperCache "hooks" into bbPress, that would be greatly appreciated.
-
- Posted 2 years ago #
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. -
- Posted 2 years ago #
@_ck_
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?
-
- Posted 2 years ago #
@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 -
- Posted 2 years ago #
@frooyo - Either get Donncha to explain the plugin (good luck, he's busy) or download it for WP and study it. Honestly, I think you're a little nuts, only because you're picking possibly the most complicated plugin in the history of WP to convert as your first plugin :)
-
- Posted 2 years ago #
@Ramoonus
Actually, I don't believe people have tried converting SuperCache over yet. Because everyone is under the mentality that bbPress is "already fast enough".
I would like to take on the challenge to converting the plug-in myself. What I don't understand is why people are giving me a hard time for attempting to create a plug-in. I'm simply trying to better the bbPress community.
As such, all I'm asking for is a little bit of assistance and that's:
- What is the hook to perform an action immediately after a new Post/comment?
- What is the hook to perform an action immediately before rendering the frontpage?
- What is the hook to perform an action immediately before rendering a topic page? -
- Posted 2 years ago #
@frooyo - Start here: http://phpxref.ftwr.co.uk/bbpress/nav.html?index.html
It has all the functions and probably the hooks as well. That's where I start when I want to figure out what's up. You can view the code in the pages, and click on links to explain what each function etc is. I have no idea what functions etc you'll need. I'd personally start by boning up on WP-Super-Cache, seeing what it hooks into on WP, and then, under the assumption the WP and BB has similar structures, look for the BB version of the WP hooks.
And then I'd get a beer.
-
- Posted 2 years ago #
frooyo I am certain not trying to discourage you from learning more about how bbPress works and trying to create plugins - however you should be able to find those hooks easily by reading the code. That's how I learned everything I know about bbPress, I keep the windows search window open and pointed to the bbPress folder and I search for things. Many times the hooks are in the dozen php files in the bbPress root, sometimes you have to dig much deeper into the core files. If you can't follow the code, you need to reconsider what you are attempting to do.
I have no idea what other plugins you've written, modified or ported from WordPress but this is not exactly and easy conversion to start with. You need to understand what can and can't be cached and it's very different from WordPress.