Support Forum
Hi,
If I may make a performance enhancing suggestion:
Simple press is heavy on database calls: about 70 different calls for a topic page.
I see you have a cache system in place, but it's also calling the database 🙂
So how about developing a plugin which takes advantage of the built-in object caching in wordpress? Object caching is a default wordpress function and looking at your code adding the option in your cache-api for object caching seems pretty straightforward and should benefit performance (provided of course the user has persistent object cache enabled). Again, this is only if the user has Redis, Memcache or APCu enabled on the server.
It's all about wp_cache_set, wp_cache_get and wp_cache_delete
You could start with your cache-api, but there's lots of other calls which could nicely be put in object cache such as newposts tracking or even user profile.
Caching is not so easy with forum data. You have to remember that the data served up in any view, is totally personalised to the user making the request. What is good for you to see is almost certainly not right for the next person to request that sane view.
Not only may their permissions be different, but their unread post list is going to be different - they may even sort the forum view differently or have adversaries set whose posts they do not want to see.
Ad admin or moderator user may be able to see posts awaiting moderation but a user must not. If the data comes out of a cache it is almost always going to be incorrect.
We perform some caching where we can and are always looking to improve that but not at the expense of serving incorrect data. And these days, a mySQL database is perfectly capable of serving large numbers of queries and, will create table level caches of it's own so often much is being done in memory.
We are obviously well aware of any caching options provided by WP but there is no safe way to use them.
YELLOW
SWORDFISH
|
1 Guest(s)