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

Mahmoud Al-Qudsi computerguru at neosmart.net
Sun Mar 23 20:51:57 GMT 2008

> > OK, scratch the MySQL idea. The overhead of 190-315 queries BY FAR*
> > exceeds the benefits gained in lookup times.
> > .... and that's on a clean install of WP running nothing but Kubrick.
> 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 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?


More information about the wp-hackers mailing list