Text::Template::Simple::Cache - Cache manager for Text::Template::Simple
TODO
This is a base class for Text::Template::Simple.
Text::Template::Simple
Resets the in-memory cache and deletes all cache files, if you are using a disk cache.
Returns a string version of the dumped in-memory or disk-cache. Cache is dumped via Data::Dumper. Deparse option is enabled for in-memory cache.
Deparse
Early versions of Data::Dumper don' t have a Deparse method, so you may need to upgrade your Data::Dumper or disable deparse-ing if you want to use this method.
Data::Dumper
dump_cache accepts some arguments in name => value format:
dump_cache
name => value
varname
Controls the name of the dumped structure.
no_deparse
If you set this to a true value, deparsing will be disabled
Returns a list including the names (ids) of the templates in the cache.
Gets/sets the cache id.
Returns the total cache (disk or memory) size in bytes. If you are using memory cache, you must have Devel::Size installed on your system or your code will die.
This method can be called with data or id named parameter. If you use the two together, id will be used:
data
id
if($template->has(id => 'e369853df766fa44e1ed0ff613f563bd')) { print "ok!"; }
or
if($template->has(data => q~Foo is <%=$bar%>~)) { print "ok!"; }
Burak Gürsoy, <burak@cpan.org>
Copyright 2008 Burak Gürsoy. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available.
To install Text::Template::Simple, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::Template::Simple
CPAN shell
perl -MCPAN -e shell install Text::Template::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.