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

NAME

6       Text::Template::Simple::Cache
7

VERSION

9       version 0.91
10

SYNOPSIS

12          TODO
13

DESCRIPTION

15       Cache manager for "Text::Template::Simple".
16

NAME

18       Text::Template::Simple::Cache - Cache manager
19

METHODS

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

AUTHOR

90       Burak Gursoy <burak@cpan.org>
91
93       This software is copyright (c) 2004 by Burak Gursoy.
94
95       This is free software; you can redistribute it and/or modify it under
96       the same terms as the Perl 5 programming language system itself.
97
98
99
100perl v5.36.0                      2023-01-20  Text::Template::Simple::Cache(3)
Impressum