At 12:25 -0400 2001.10.02, Chris Winters wrote:
>* Chris Nandor ([EMAIL PROTECTED]) [011002 12:08]:
>> Yes, if you do $template->process(\$foo), it is compiled each time through.
>> In Slash::Display::Provider, I actually keep a hash around that lets me
>> store string -> name, and then use that name ("anon_$count") to reference
>> the cached template.  The hash lookup is cheaper than compiling the
>> template each time ... :-)
>
>Seconded! I swiped, er, borrowed this from slashcode for
>OpenInteract::Template::Provider and it works great.

Oh, cool.  Note that one problem in the existing code is that it shares
template names for multiple virtual hosts.  This is a bug I need to fix ...
I need to store the cache with our other virtual host data, not as a
lexical variable in the module (a minor change, one that would be specific
to your own app anyway, probably).

-- 
Chris Nandor                      [EMAIL PROTECTED]    http://pudge.net/
Open Source Development Network    [EMAIL PROTECTED]     http://osdn.com/


Reply via email to