[wp-hackers] Caching in core? (was: Caching in 2.5: anyone has a file-based caching plugin?)

Thomas Bukowski wordpress at neodude.net
Sun Mar 23 21:01:11 GMT 2008

On Mar 23, 2008, at 4:51 PM, Mahmoud Al-Qudsi wrote:

>> That's insane - definitely kills the idea stone dead. Unless.. could
>> one prefetch a bunch of 'standard' objects at the very start, and  
>> work
>> from there? That might reduce the query count down significantly.
>> Another idea: fetch an entire group when one item from that group is
>> requested; maybe you're doing  this already.
> I guess that's possible; it certainly would reduce the overhead...  
> But at the moment the caching system simply retrieves items by key  
> (basically the DB becomes a <key,value> dictionary) and there is no  
> sense of "relationships" between the various keys. Perhaps that  
> could be added though, one would need to look into that.

I was thinking to build the database caching on top of the current per- 
invocation object cache; basically, fork wp-includes/cache.php as is  
now, then cache the groups at shutdown, and prefetch some (all?) of  
the groups at wp_cache_init. Basically prefill WP_Object_Cache::cache.

>> I hope using the database for caching full html pages will be a  
>> little
>> more realistic.
> Well, if you're caching a full page there shouldn't be any problem  
> with storing the HTML on-disk (assuming the problem with file-based  
> object-caching is the sheer number of requests - similar to above).  
> Any particular reason why you'd store the HTML in the DB instead?

I'm working on the assumption that the size of people running  
wordpress on shared hosts with no filesystem writing support is non- 
negligible. I have no idea if this is correct; do you have an idea?


More information about the wp-hackers mailing list