[Templates] Caching Output of Components
Perrin Harkins
perrin@elem.com
Mon, 07 Aug 2006 11:43:11 -0400
On Sun, 2006-08-06 at 21:29 -0400, Robert James Kaes wrote:
> On Sun, 06 Aug 2006, Randal L. Schwartz wrote:
[...]
> > I've looked at this a number of times, and never gotten very far. If I may
> > misquote Perrin
You may!
> Having thought about the problem a bit more, I can likely simulate what
> I'm looking for by using a template that INSERTs the "dynamic" content
> that was generated by a cronjob periodically. This would move the heavy
> DB processing offline relative to the page view.
That's a sensible, easy-to-build approach. It should be faster than the
cache plugin I wrote, since it won't need to check expiration times (or
use the fairly slow Cache::Cache modules).
If you want to go for the gold star, you can use the mtime from your
inserted file as the Last-Modified header on the page and make your app
handle If-Modified-Since requests.
- Perrin