Text::T...e::Cache(3)

πŸ“¦
version 0.91 Β· 2 versions
, in fedora 43

✨ NAME ✨

okay bestie, say hi to Text::Template::Simple::Cache πŸ’– this is the page from the Text::T...e::Cache(3) manual, and it's literally the cache manager for Text::Template::Simple. that's the whole vibe. no cap.


🌸 VERSION 🌸

version 0.91 β€” yes queen, we're on 0.91 πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

TODO
not me leaving this blank 😭 the docs said TODO and honestly? same energy. it's giving "we'll fill this in later" and later never came πŸ’€

πŸ’… DESCRIPTION πŸ’…

so what is this? it's the cache manager for Text::Template::Simple. that's it, that's the description. it manages the cache. iconic behaviour, honestly πŸ‘‘


πŸ’œ NAME πŸ’œ

Text::Template::Simple::Cache β€” Cache manager. she does exactly what it says on the tin, periodt ✨


🌈 METHODS 🌈

πŸ“ new PARENT_OBJECT

Constructor, aka the birth of a legend ✨ it accepts a Text::Template::Simple object as the parameter. hand it your template object and you're off 🫢

πŸ“ type

Returns the type of the cache. just... tells you what kind of cache you got. lowkey useful, highkey simple πŸ’…

πŸ“ reset

Resets the in-memory cache and deletes all cache files, if you are using a disk cache. 🧹✨

heads up bestie β€” if you're on a disk cache, this one goes scorched earth. everything in memory, every cache file on disk. gone. know what you're doing before you call it πŸ’€

πŸ“ dumper TYPE

$template->cache->dumper( $type, \%opt );

TYPE can either be structure or ids. and dumper accepts some arguments as a hash reference:

$template->cache->dumper( $type, \%opt );

the options you can drop in that hashref:

  • varname β€” controls the name of the dumped structure. you get to name the thing, main character privileges πŸ‘‘
  • no_deparse β€” if you set this to a true value, "deparsing" will be disabled. bye deparse πŸ’…
  • structure β€” returns a string version of the dumped in-memory or disk-cache. the cache is dumped via Data::Dumper, and the "Deparse" option is enabled for in-memory cache.
real talk 🫢 early versions of Data::Dumper don't have a Deparse method, so you may need to upgrade your Data::Dumper or disable "deparsing" if you want to use this method. don't say nobody warned you 😭
  • ids β€” returns a list including the names (ids) of the templates in the cache. a lil guest list of everything chilling in there πŸŽ€

πŸ“ id

Gets/sets the cache id. get it, set it, whatever you need, bestie πŸ’–

πŸ“ size

Returns the total cache (disk or memory) size in bytes. πŸ“

if memory cache is used, then you must have Devel::Size installed on your system to get the size of the data structure inside memory. no Devel::Size? no number. that's the rule 🀷

πŸ“ has data => TEMPLATE_DATA and has id => TEMPLATE_ID

this method can be called with the data or the id named parameter. and if you use the two together, id will be used β€” id wins, always, no debate πŸ’…

if ( $template->cache->has( id => 'e369853df766fa44e1ed0ff613f563bd' ) ) {
   print "ok!";
}

or

if ( $template->cache->has( data => q~Foo is <%=$bar%>~ ) ) {
   print "ok!";
}

πŸ“ hit

TODO
once again, TODO πŸ™ˆ the mystery method. she's giving "coming soon" and honestly we respect the suspense

πŸ“ populate

TODO
and ANOTHER TODO 😭 two mystery methods in one page, this is truly the unhinged era of documentation and i'm obsessed

πŸ’– AUTHOR πŸ’–

Burak Gursoy <burak@cpan.org> β€” thank you for your service legend 🫢


This software is copyright (c) 2004 by Burak Gursoy.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, free software rights fr fr πŸ’œ


okay that's the whole page, you ate it, you're welcome πŸ’…βœ¨ this was Text::T...e::Cache(3) β€” perl v5.42.0, dated 2025-07-25, and it's genuinely giving iconic. mwah πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from