Scroll to navigation

Cache::Ref::CAR(3pm) User Contributed Perl Documentation Cache::Ref::CAR(3pm)

NAME

Cache::Ref::CAR - CLOCK with Adaptive Replacement

SYNOPSIS

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

DESCRIPTION

This algorithm is an implementation of http://www.almaden.ibm.com/cs/people/dmodha/clockfast.pdf.

See also Cache::Ref::CART which is probably more appropriate for random access work loads.

CAR balances between an MFU like policy and an MRU like policy, automatically tuning itself as the workload varies.

ATTRIBUTES

The size of the live entries.

Note that the cache also remembers this many expired keys, and keeps some metadata about those keys, so for memory usage the overhead is probably around double what Cache::Ref::LRU requires.

AUTHOR

Yuval Kogman

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.

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

alternative text 'http://www.almaden.ibm.com/cs/people/dmodha/clockfast.pdf' contains non-escaped | or /
2021-01-07 perl v5.32.0