Template::Provider::MD5 is a Perl module with MD5 Cached Compiled SCALARS for Template Toolkit.
SYNOPSIS
use Template::Provider::MD5;
use Template;
# NOTE: Config is shared between Providers and Templates there is no
# clear separation.
my $config = {
INCLUDE_PATH => "Some/Include/Path",
EVAL_PERL => 0,
COMPILE_DIR => "/var/tmp/TTCache",
COMPILE_EXT => '.ttc',
};
# MAke your provider first, otherwise Template will make one for you.
my $p = Template::Provider::MD5->new($config);
$config->{LOAD_TEMPLATES} = [$p];
$config->{PREFIX_MAP} = {default => 0};
my $tt = Template->new($config);
... use $tt as per standard Template Toolkit ...
Extension for Template Toolkit to cache SCALAR Templates by using MD5. A Template::Provider is actually designed to provide an alternate method for getting data (eg: the example is a WEB Access Module). In this case it is actually a replacement to the default Template::Provider by providing caching for strings and then falling back to the original when required.
Product's homepage
Requirements:
· Perl