This module implements a least recently used (LRU) cache in memory

through a tie interface. Any time data is stored in the tied hash, that
key/value pair has an entry time associated with it, and as the cache
fills up, those members of the cache that are the oldest are removed to
make room for new entries.

So, the cache only "remembers" the last written entries, up to the size
of the cache. This can be especially useful if you access great amounts
of data, but only access a minority of the data a majority of the time.

ok simon@
This commit is contained in:
merdely 2007-09-25 22:11:54 +00:00
parent 6b719e761d
commit 8e64585139
4 changed files with 33 additions and 0 deletions

View File

@ -0,0 +1,14 @@
# $OpenBSD: Makefile,v 1.1.1.1 2007/09/25 22:11:54 merdely Exp $
COMMENT= LRU cache in memory
MODULES= cpan
DISTNAME= Tie-Cache-0.17
CATEGORIES= devel
# perl
PERMIT_PACKAGE_CDROM= Yes
PERMIT_PACKAGE_FTP= Yes
PERMIT_DISTFILES_CDROM= Yes
PERMIT_DISTFILES_FTP= Yes
.include <bsd.port.mk>

View File

@ -0,0 +1,5 @@
MD5 (Tie-Cache-0.17.tar.gz) = k/G7gAaBWt4k/eMJklzr4A==
RMD160 (Tie-Cache-0.17.tar.gz) = fj/R/poAxP4WJ8N2jQi0dsHer5M=
SHA1 (Tie-Cache-0.17.tar.gz) = SKiTIe7G+MU9NhaTwD5UtfSmh8c=
SHA256 (Tie-Cache-0.17.tar.gz) = Rx0m/N+csjUE8+VCU+VJVwfPJwyu3tX8d38gbhkC59k=
SIZE (Tie-Cache-0.17.tar.gz) = 11627

View File

@ -0,0 +1,9 @@
This module implements a least recently used (LRU) cache in memory
through a tie interface. Any time data is stored in the tied hash, that
key/value pair has an entry time associated with it, and as the cache
fills up, those members of the cache that are the oldest are removed to
make room for new entries.
So, the cache only "remembers" the last written entries, up to the size
of the cache. This can be especially useful if you access great amounts
of data, but only access a minority of the data a majority of the time.

View File

@ -0,0 +1,5 @@
@comment $OpenBSD: PLIST,v 1.1.1.1 2007/09/25 22:11:54 merdely Exp $
${P5SITE}/Tie/
${P5SITE}/Tie/Cache.pm
${P5SITE}/Tie/bench.pl
@man man/man3p/Tie::Cache.3p