Text::...e::File(3pm)

πŸ“¦
version 2.23 Β· 3 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Text::MicroMason::Cache::File β€” it's a Basic Cache with File-Based Expiration, bestie!! πŸŽ€ And yeah, it's from the User Contributed Perl Documentation collection, so you know it's the people's manpage fr fr. πŸ’…


✨ DESCRIPTION ✨

okay so picture this: this lil cache class is simple simple. The keys you hand it? They're file pathnames. That's the whole vibe. πŸ¦‹

And here's the iconic part β€” it decides a cached value has expired when the corresponding file gets changed. Like, the file moved on, so the cache moves on too. main character energy honestly. πŸ‘‘

But ngl, it does NOT do these things, so don't come for it:

  • cache size limiting 🚫
  • deep copying of complex values 🚫
lowkey it's a minimalist. it knows what it is. respect it. πŸ’€

🌸 Public Methods 🌸

  • new()
$cache = Text::MicroMason::Cache::File->new();

yeah this just... makes you a cache. the origin story. the birth. 🐣✨

  • get()
$value = $cache->get( $filename );

Retrieves the value associated with this key β€” or undef if there's literally no value there. no value, no problem, just undef. 🫢

  • set()
$cache->set( $filename, $value );

Stores the provided value in association with this key. match made in heaven, value + key, periodt. πŸ’–

  • clear()
$cache->clear();

Removes all data from the cache. like a factory reset but make it dramatic. everything gone. poof. πŸŒˆπŸ’¨


πŸ¦‹ SEE ALSO πŸ¦‹

  • Wanna know what actually uses this cache class? go look at Text::MicroMason::CompileCache. iykyk. πŸ‘€
  • There are more cache classes chilling in the Text::MicroMason::Cache:: namespace β€” or you can go pick other caching modules on CPAN that support the interface described in Cache::Cache. options, bestie, we love options. πŸ’…
  • For distribution, installation, support, copyright and license info, see Text::MicroMason::Docs::ReadMe. it's all in there, no cap. πŸ“–

and that's the whole page bestie!! πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…πŸ«Ά

this was perl v5.36.0, dated 2023-08-10, and the page itself is Text::...e::File(3pm) β€” slay, go forth and cache responsibly. πŸ‘‘πŸ’œ

πŸ“¦ where this page comes from