8e64585139
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@
10 lines
525 B
Plaintext
10 lines
525 B
Plaintext
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.
|