logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Cache::Ref::LIFO - Saves entries until full, discarding subsequent sets.

Author

       Yuval Kogman

Description

       This is a very naive cache algorithm, it saves cache sets until the cache is full, at which point all
       additional saves which aren't a value update are discarded immediately.

       For very predictable workflows this is potentially a good fit, provided the MFU is used early on.

       The advantages is that the code is very simple as a result.

Name

       Cache::Ref::LIFO - Saves entries until full, discarding subsequent sets.

Synopsis

           my $c = Cache::Ref::LIFO->new( size => $n );

           $c->set( foo => 42 );

           $c->get("foo");

See Also