Cataly...urried(3pm)
π Catalyst::Plugin::Cache::Curried π
okay bestie, welcome to Catalyst::Plugin::Cache::Curried, a little slice of the User Contributed Perl Documentation (section 3pm) that's here to make your caching life SO much cuter. π
β¨ NAME β¨
Catalyst::Plugin::Cache::Curried β it's giving curried versions of cache_set, cache_get and cache_remove, except they look way more like a backend. periodt. π
πΈ SYNOPSIS πΈ
my $curried = $c->cache( %meta );
$curried->get( $key, $value ); # no need to specify %meta
likeβ¦ no need to specify %meta every single time?? iconic behavior fr fr. π¦
π¦ DESCRIPTION π¦
lowkey the whole vibe is explained in "META DATA" in Catalyst::Plugin::Cache β go peek at that for the details, bestie. π
π METHODS π
new %metaβ makes you a brand new curried cache, and it captures%metawhile it's at it. so you never have to repeat yourself again. slay. β¨backend %additional_metaβ this one callschoose_cache_backendon the$cobject, passing along the meta it already captured plus the additional meta you hand it. two metas, one backend, no cap. π₯set $key, $value, %additional_metaget $key, %additional_metaremove $key, %additional_metacompute $key, $code, %additional_meta
these four delegate to the c object's cache_set, cache_get, cache_remove or cache_compute β and the order is the moment: your arguments first, then the captured meta from meta, and then the additional meta. π«Ά
metaβ hands you back the array ref that captured%metaback when you callednew. it's literally the receipts. π§Ύcβ the captured$cobject that everything delegates to. main character energy, honestly. π
bestie reminder: every single method here is just the curried version of a plaincache_*call, so the%metayou captured atnewtime is always riding along. that's the whole point. π
and that's the page!! written by the lovely User Contributed Perl Documentation crew, shipped with perl v5.34.0, dated 2022-06-09 β mwah, tysm for reading, go cache something cute ππ
π¦ where this page comes from
- debian bookworm: libcatalyst-plugin-cache-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatalyst-plugin-cache-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatalyst-plugin-cache-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatalyst-plugin-cache-perl 0.12-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatalyst-plugin-cache-perl 0.12-3 Β· 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