| User | Post |
|
|
|
I now use the outstanding WP Super Cache. One side effect is that when new topics or comments are posted to my copy of SF, the cache isn’t cleared so that those new topics or comments will show up. Instead, they have to wait until the cache is cleared automatically. Is there a way to make SF clear the cache when new topics and comments are posted?
|
|
|
|
|
I have never looked into WP Super Cache but if it basically works the same as WP Cache then excludng the forum slug in the cache options should be all you need to do. If that isn’t an option then you’d be better off talking to the cache author - although it would be good to know the answer here.
|
|
|
|
|
Andy, excluding the forum slug would mean that the forum was never cached. I really need it to be: the speed improvement from caching is substantial and makes a difference to the usability of the forum.
The author of WP-Super-Cache suggests this course of action, though it’s still more than I’m capable of at the moment.
Look through the simple forums documentation or source, and hopefully you’ll find an action you can call ‘wp_cache_no_postid’ on. For example, if it’s called ’simple_forums_post’ then the action is:
add_action( ’simple_forums_post’, ‘wp_cache_no_postid’ );
|
|
|
|
|
I didn’t totally follow what he was saying in that forum response. Hopefully he’ll come back and answer your last question.
I may well try this plugin actually so that may help. My problem, or perhaps your problem, is that I can’t do this quickly…
|
|
|
|
|
Andy, do you have any more idea than idea how that "wp_cache_no_postid"
is supposed to be called? It doesn’t seem to work if I attach it the
either of the post fuctions sf_save_topic or sf_save_post. I suspect it needs to be attached to an actual WP action, but I don't see any in your code that look suitable.
|
|
|
|
|
Andy, the make or WP Super Cache has posted some more code about this–I’m going to see if I can make it work but I’m interested in your experience with it, too.
|
|
|
|
|
Well I am probably daft but I don’t really see how creating a separate file that is not incuded with anything else is going to do much. Anyway the save topic and save functions and just internal functions creating database records. There is nothing there to be cached. it is the display that matters I would have thought.
|
|
|
|
|
if I manage to get done what I need to get done tomorrow and have some time I’ll download the plugin and take a look at it.
|
|
|
|
|
I’ve been taking a look at this over the past hour and to be honest I can see absolutly no way that it could ever work with the forum which uses a single page dynamically populated and rendered.
I’d love to be proven wrong because then I could use it myself but I think it’s probably impossible.
|
|
|
9:18 pm 21 Nov 2007
| -Radio-
Moderator
| | Florida - USA | |
|
| posts 475 |
|
|
if what I am reading is correct, the cache should be cleared whenever a new post is saved or an old forum post is edited.
The next time the forum is rendered, the cache is repopulated.
This would have some adverse effects globally on SF however as SF has some data displayed dynamicaly such as ‘Currently Online:’ and the ‘Sidebar Widget’.
SF also has different displays for different users, such as Admin, Moderators, members logged in, members logged out, and guests.
Conceivably you could AJAXify those portions of the display sequence, or the logged in status and level of the user could be recognized in the super cache plugin.
Conversely, some of the Super Cache code could be used in rendering the dynamic content of SF, as an addon to SF, or added into a complete re-write of the SF core code for the next version.
Good Idea: Big Job.
(Think Big, or go home! I like this guy! LOL)
|
|
|
|
|
|
9:39 pm 21 Nov 2007
| -Radio-
Moderator
| | Florida - USA | |
|
| posts 475 |
|
|
Andy, seriously, I wouldn’t want ME messing around in code that I had done such a good job on.
I’m jealous as hell that you have such tallent, but I wouldn’t go up against you in a code war.
DEBUGGING? … there I can help…
You build it, I can break it.
|
|
|
|
|
A useful skill! Do you have any off-line, non-public facing test sites?
|
|
|
10:04 pm 21 Nov 2007
| -Radio-
Moderator
| | Florida - USA | |
|
| posts 475 |
|
|
I have free hosting that I offer as part of my EVBID.com company, I can easily create one.
The servers do run the latest wordpress and SF releases that I have tried, however some plugins, that require that apachee run outside of SAFE MODE, will not work (wp-auto-update and wp-latest version, are two such examples.)
|
|