[wp-hackers] Caching as part of the core

Aaron Jorbin aaron at jorb.in
Tue Jul 24 23:59:26 UTC 2012

On Tue, Jul 24, 2012 at 7:11 PM, Bryan Petty <bpetty at bluehost.com> wrote:

> What if the Transients API was converted over to a WP_Object_Cache
> backend, and used as the default fallback instead of the file backend if
> none of the accelerators are available (APC/XCache/WinCache)? The
> current API can still continue to fire off the same filters (and will
> just make calls into wp_cache_get/set()) and new code can feel fine
> about using wp_cache_get() with an expiration again, and page/fragment
> caching plugins have a persistent object cache to use before the hooks
> system is initialized. The transients API is really just a DB object
> cache backend anyway (but with filters).

The transients API isn't just a db cache, it uses the object cache if it is
setup to be used[1]. The decision is left up to the site developer as to if
they want to use an object cache or not.  Seting up a scalable instillation
using an object cache is documented pretty well[2].

If you want to make sure something persists, this is the cache level that
most developers should be using(through the use of TLC transients[3] in
many instances).

1) http://core.trac.wordpress.org/browser/trunk/wp-includes/option.php#L408
2) http://evansolomon.me/notes/faster-wordpress-multisite-nginx-batcache/
3) https://github.com/markjaquith/WP-TLC-Transients

twitter: twitter.com/aaronjorbin

> --
> Bryan Petty
> WordPress Developer
> bpetty at bluehost.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list