Hello all, I was just wondering if it would theoretically be possible to extend Template::Toolkit to allow something like the following:
[% CACHE key => 'latest-stories' ttl => '3600' %] ... Expensive calculations go here ... [% END %] I'm aware of Template::Plugin::Cache, but I don't like the fact that fragments I'd like to cache have to be included. I'd rather have fragments take care of caching themselves, like Mason's cache_self() method. On a side note, Template::Plugin::Cache seems to have problems with Memcached and UTF-8 because the UTF-8 flag is not set on content retrieved from the cache. This should be easy to fix with something like: Encode::_utf8_on( $result ); What do you think? And how, if possible, would you go about implementing this? Thanks a lot! --Tobias _______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
