1Text::Template::Simple:U:sCearchCeo(n3t)ributed Perl DocTuemxetn:t:aTteimopnlate::Simple::Cache(3)
2
3
4

NAME

6       Text::Template::Simple::Cache - Cache manager
7

SYNOPSIS

9          TODO
10

DESCRIPTION

12       This document describes version 0.90 of "Text::Template::Simple::Cache"
13       released on "5 July 2016".
14
15       Cache manager for "Text::Template::Simple".
16

METHODS

18   new PARENT_OBJECT
19       Constructor. Accepts a "Text::Template::Simple" object as the
20       parameter.
21
22   type
23       Returns the type of the cache.
24
25   reset
26       Resets the in-memory cache and deletes all cache files, if you are
27       using a disk cache.
28
29   dumper TYPE
30          $template->cache->dumper( $type, \%opt );
31
32       "TYPE" can either be "structure" or "ids".  "dumper" accepts some
33       arguments as a hash reference:
34
35          $template->cache->dumper( $type, \%opt );
36
37       "varname"
38           Controls the name of the dumped structure.
39
40       no_deparse
41           If you set this to a true value, "deparsing" will be disabled
42
43       structure
44
45       Returns a string version of the dumped in-memory or disk-cache.  Cache
46       is dumped via Data::Dumper. "Deparse" option is enabled for in-memory
47       cache.
48
49       Early versions of "Data::Dumper" don' t have a "Deparse" method, so you
50       may need to upgrade your "Data::Dumper" or disable "deparsing" if you
51       want to use this method.
52
53       ids
54
55       Returns a list including the names (ids) of the templates in the cache.
56
57   id
58       Gets/sets the cache id.
59
60   size
61       Returns the total cache (disk or memory) size in bytes. If memory cache
62       is used, then you must have Devel::Size installed on your system to get
63       the size of the data structure inside memory.
64
65   has data => TEMPLATE_DATA
66   has id   => TEMPLATE_ID
67       This method can be called with "data" or "id" named parameter. If you
68       use the two together, "id" will be used:
69
70          if ( $template->cache->has( id => 'e369853df766fa44e1ed0ff613f563bd' ) ) {
71             print "ok!";
72          }
73
74       or
75
76          if ( $template->cache->has( data => q~Foo is <%=$bar%>~ ) ) {
77             print "ok!";
78          }
79
80   hit
81          TODO
82
83   populate
84          TODO
85

AUTHOR

87       Burak Gursoy <burak@cpan.org>.
88
90       Copyright 2004 - 2016 Burak Gursoy. All rights reserved.
91

LICENSE

93       This library is free software; you can redistribute it and/or modify it
94       under the same terms as Perl itself, either Perl version 5.24.0 or, at
95       your option, any later version of Perl 5 you may have available.
96
97
98
99perl v5.28.0                      2018-07-15  Text::Template::Simple::Cache(3)
Impressum