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

Tie::Cache::LRU::Array - Tie::Cache::LRU implemented using arrays

Author

       Michael G Schwern <schwern@pobox.com>

Description

       This is an alternative implementation of Tie::Cache::LRU using Perl arrays and built-in array operations
       instead of a linked list.  The theory is that even though the algorithm employed is more expensive, it
       will still be faster for small cache sizes (where small <= ??)  because the work is done inside perl (ie.
       higer big O, lower constant).  If nothing else, it should use less memory.

Name

       Tie::Cache::LRU::Array - Tie::Cache::LRU implemented using arrays

See Also

       Tie::Cache::LRU, Tie::Cache::LRU::Virtual, Tie::Cache

perl v5.36.0                                       2022-08-29                        Tie::Cache::LRU::Array(3pm)

Synopsis

         use Tie::Cache::LRU::Array;

         tie %cache, 'Tie::Cache::LRU::Array', 500;

         ...the rest is as Tie::Cache::LRU...

See Also