Craig McLane wrote: > Currently we cache on two levels: > > 1. raw html generated from the templates > 2. serialized objects
Is the html caching done at the page level? I've started working on a page caching module (Apache::PageCache?) that is a generalization of what Matt does in AxKit. It would use a PerlTransHandler to decide if requests can be served from the static file cache or not, and an Apache::Filter module to capture output from uncached requests and place it in the cache. > Regarding the need for cached templates, I can easily see a requirement > for "personalized" content on certain pages which is the reason I start > hungering for a good template caching solution. I am thinking of a page > where most of the data is cached for a certain ttl, and an include which > contains the calls to personalized data is labeled "volatile" so it is the > only template that has anything processed on each request. That's how Vignette StoryServer works. It caches the results of templates separately and leaves the includes in so that an "inner" template can have a shorter TTL. The downside is that you always have to process the includes, even when everything is cached, and you might have lots of includes for a given page. I'm not a big fan of this approach. The ugly but easy alternative is to wrap two cached areas around your volatile template: +------------+ | LONG TTL | | | +------------+ | short TTL | +------------+ | | | LONG TTL | +------------+ It's lame to have to cache these two long TTL pieces separately, since they're really one section, but it avoids doing anything tricky to handle the short TTL piece in the middle (the user's name or something). - Perrin
