[Templates] Caching Output of Components
Randal L. Schwartz
merlyn@stonehenge.com
06 Aug 2006 15:45:43 -0700
>>>>> "Robert" == Robert James Kaes <rjk@wormbytes.ca> writes:
Robert> I'd like to say "the output of all components are cached. If a child
Robert> component has changed, invalidate the child cache and its parent's
Robert> cache." It would also be nice to selectively say "this component's
Robert> output must never be cached."
I've looked at this a number of times, and never gotten very far. If I may
misquote Perrin, he's said something to the effect that the expense for
determining when to blow a cache (and how much to blow) often exceeds the cost
of just recomputing the darn thing. And yes, it's a can of worms.
If there are things that are truly static, use a ttree-like building scheme to
do those once. Otherwise, you're probably better off caching only at the page
level for those pages that you know won't change at all.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!