Cache::Ref::CART(3pm)
β¨ NAME β¨
Cache::Ref::CART β it's CAR, bestie, but with temporal filtering π
(also: this is a User Contributed Perl Documentation page, iykyk)
πΈ SYNOPSIS πΈ
my $c = Cache::Ref::CART->new(
size => $n,
);
that's it. that's the whole vibe. go off π
π¦ DESCRIPTION π¦
okay so, this algorithm is an extension to Cache::Ref::CAR β like, CAR but with a lil glow-up β¨ The glow-up in question? temporal filtering on the upgrading from MRU to MFU pool. π
Which meansβ¦ (and this is the important part, don't skip it bestie) β two subsequent accesses to the same key do not automatically make it viable for long term caching. Nope. Not enough. π ββοΈ
To actually get upgraded to MFU status, a key must be expired but known in the history. That's the bar. that's the entry requirement. it's giving exclusive club energy π
And fr fr? This is probably the most general purpose caching algorithm. like, if you don't know which one to pick, it's this one. periodt. π
π ATTRIBUTES π
sizeβ the size of the live entries.
π«Ά heads up bestie: the cache also remembers this many expired keys, and keeps some metadata about those keys too. So for memory usage, the overhead is probably around double what Cache::Ref::LRU requires. plan accordingly, it's giving hungry π
π AUTHOR π
Yuval Kogman β the icon, the legend, the moment β
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2010 by Yuval Kogman.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like, go forth and remix, just keep it free π
okay that's the whole page, ily, go cache something responsibly π
perl v5.32.0 β 2021-01-07 β¨ that's the version and the date, bestie, stamped and slayed π π¦
π¦ where this page comes from
- debian bookworm: libcache-ref-perl 0.04-1.1
- debian trixie: libcache-ref-perl 0.04-1.1
- ubuntu jammy: libcache-ref-perl 0.04-1.1
- ubuntu noble: libcache-ref-perl 0.04-1.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms