[wp-hackers] Caching as part of the core

Michael Van Winkle mike at mikevanwinkle.com
Tue Jul 24 19:06:38 UTC 2012

Thanks Otto, but actually the reason I want access late in the process is
because on any given page I like to be able cache different chunks or
*template parts* according to different rules ... this block of posts can
be cached for X minutes, etc. I can do that without a filter in
load_template but said filter would allow me to manage it a little cleaner.
Though maybe I don't fully understand the {$type}_template hook so I'll
take another look.


On Mon, Jul 23, 2012 at 8:47 PM, Otto <otto at ottodestruct.com> wrote:

> 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
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

Mike Van Winkle
mike at mikevanwinkle.com

"All excellent things are as difficult as they are rare." -Spinoza

More information about the wp-hackers mailing list