Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/schwern/tie-cache-lru
Tie::Cache::LRU - a least recently used cache
https://github.com/schwern/tie-cache-lru
Last synced: about 1 month ago
JSON representation
Tie::Cache::LRU - a least recently used cache
- Host: GitHub
- URL: https://github.com/schwern/tie-cache-lru
- Owner: schwern
- Created: 2011-02-05T03:46:00.000Z (almost 14 years ago)
- Default Branch: master
- Last Pushed: 2023-02-06T01:19:47.000Z (almost 2 years ago)
- Last Synced: 2024-10-29T20:08:33.582Z (2 months ago)
- Language: Perl
- Homepage: http://search.cpan.org/dist/Tie-Cache-LRU
- Size: 293 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README
- Changelog: Changes
Awesome Lists containing this project
README
=head1 NAME
Tie::Cache::LRU - A Least-Recently Used cache
=head1 SYNOPSIS
tie %cache, 'Tie::Cache::LRU', 500;
tie %cache, 'Tie::Cache::LRU', '400k'; #UNIMPLEMENTED# Use like a normal hash.
$cache_obj = tied %cache;
$current_size = $cache_obj->curr_size;
$max_size = $cache_obj->max_size;
$cache_obj->max_size($new_size);=head1 DESCRIPTION
This is an implementation of a least-recently used (LRU) cache keeping
the cache in RAM.A LRU cache is similar to the kind of cache used by a web browser.
New items are placed into the top of the cache. When the cache grows
past its size limit, it throws away items off the bottom. The trick
is that whenever an item is -accessed-, it is pulled back to the top.
The end result of all this is that items which are frequently accessed
tend to stay in the cache.=head1 AUTHOR
Michael G Schwern for Arena Networks
WHAT IS THIS?
This is Tie::Cache::LRU, a perl module. Please see the README that comes with
this distribution.HOW DO I INSTALL IT?
To install this module, cd to the directory that contains this README
file and type the following:perl Makefile.PL
make
make test
make installTo install this module into a specific directory, do:
perl Makefile.PL PREFIX=/name/of/the/directory
...the rest is the same...Please also read the perlmodinstall man page, if available.
WHAT MODULES DO I NEED?
Carp::Assert
enum
Class::Virtual
Class::Data::Inheritable
Test::More