[wp-hackers] Caching as part of the core
Otto
otto at ottodestruct.com
Tue Jul 24 03:47:48 UTC 2012
On Mon, Jul 23, 2012 at 1:25 PM, Michael Van Winkle
<mike at mikevanwinkle.com> wrote:
> There are a few places in WP where'd I would like to be able to
> filter the output so I can deliver a cached version. For example in the
> load_template() function it would be nice to have the ability to return a
> "fragment" from the object cache rather than reloading the template file.
The load_template function is a bit late in the process. You should
probably hook to {$type}_template, in the get_query_template()
function. This will let you redirect specific templates to your own
based on the theme_hierarchy. Then you can do whatever caching you
feel necessary.
-Otto
More information about the wp-hackers
mailing list