Text::...:Simple(3pm)
π Text::MicroMason::Cache::Simple β the manual, but make it slay π
okay bestie, sit down, hydrate, because we're talking about Text::MicroMason::Cache::Simple (that's the 3pm page, Perl gang rise up π«Ά). It's a User Contributed Perl Documentation page and it is exactly what it sounds like: the simplest lil cache in the MicroMason cinematic universe.
β¨ NAME β¨
Text::MicroMason::Cache::Simple β a Basic Cache with Minimal Interface. Minimal. Interface. The way that it does the absolute least and is iconic for it. π
π¦ DESCRIPTION π¦
This trivial cache class just stores values in a hash. That's it. That's the whole personality. It's giving "I have one job and I am doing it." π
But listen β it does not perform any of the following functions, and we're gonna be so fr about this:
- expiration
- cache size limiting
- flatening of complex keys
- deep copying of complex values
No cap, if you needed any of those four things, this is not the cache for you and she will not be pretending otherwise. She's a hash. Respect her limits. π
πΈ Public Methods πΈ
new()
$cache = Text::MicroMason::Cache::Simple->new();
Make a brand new cache. Fresh start, clean slate, main character energy. β¨
get()
$value = $cache->get( $key );
Retrieves the value associated with this key, or undef if there is no value.
Not me handing you undef and you acting surprised. If it's not there, it's not there bestie π
set()
$cache->set( $key, $value );
Stores the provided value in association with this key. Match made in heaven. Locked in. π₯
clear()
$cache->clear();
Removes all data from the cache. Everything gone. Empty. Poof. π
π SEE ALSO π
For uses of this cache class, see Text::MicroMason::CompileCache. That's where the plot happens, iykyk.
Additional cache classes are available in the Text::MicroMason::Cache:: namespace, or you can select other caching modules on CPAN that support the interface described in Cache::Cache. Options, options, options β we love a menu π
For distribution, installation, support, copyright and license information, see Text::MicroMason::Docs::ReadMe. Go read it, it's important, I'm literally begging π«Ά
and that's the page!! this one shipped with perl v5.36.0, dated 2023-08-10, and it was generated as part of the User Contributed Perl Documentation. mwah, love u, go cache something responsibly πβ¨ππ¦πΈ
π¦ where this page comes from
- debian trixie: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libtext-micromason-perl 2.23-5 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms