On Fri, Jan 13, 2006 at 08:41:00AM -0500, Darren Chamberlain wrote: > On 1/13/06, Bill Moseley <[EMAIL PROTECTED]> wrote: > > I want to store templates in the database, and I'm just looking for > > tips or ideas from others that may also be doing this. > > Before you go too far down this path on your own, take a look at how > Slash does it. The Slash::Display::Provider[0] module is a > Template::Provider subclass, and correctly handles caching and all > that fun stuff. Slash doesn't use hierarchical URIs, though, so it > doesn't solve this problem.
This is really static data so I was planning on caching higher up. But it brings up an old lingering question. What I'm doing is passing process() an open file handle for the template. So Provider is using time() for the mtime of the template. If I read the code correctly, then I don't get compiled template caching, correct? Anyway to pass in a file handle handle as a template and also pass in the mtime so compiled caching will work? > [0] > http://cvs.sourceforge.net/viewcvs.py/slashcode/slash/Slash/Display/Provider/Provider.pm?rev=1.15&view=auto Thanks. That's the FAQ answer, IIRC. -- Bill Moseley [EMAIL PROTECTED] _______________________________________________ templates mailing list [email protected] http://lists.template-toolkit.org/mailman/listinfo/templates
