Thanks 1nickt,
I only meant im-memory caching during the application lifetime. Not between runs (that's for sure not what one wants to do in a module).
Upon reading your reply, I rushed to revisit my code that dealt with caching scalar reference templates. What I found there was exactly my $compiled = $tt->template(\$in_memory); sequence - at which I arrived after trying to utilize Template::Provider.
So caching compiled templates is indeed simple. It's just not quite obvious from documentation. And the possible speed penalty is a pitfall that's worth mentioning.
In reply to Re^4: Best practices: Generating HTML content
by Dallaylaen
in thread Best practices: Generating HTML content
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |