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.
The implementation is a hash, for quick lookups, overlaying a doubly linked list for quick insertion and deletion. On a WinNT PII 300, writes to the hash were done at a rate 3100 per second, and reads from the hash at 6300 per second. Work has been done to optimize refreshing cache entries that are frequently read from, code like $cache{entry}, which moves the entry to the end of the linked list internally.
Package Version | Update ID | Released | Package Hub Version | Platforms | Subpackages |
---|---|---|---|---|---|
0.21-bp156.3.1 info | GA Release | 2023-07-22 | 15 SP6 |
|
|
0.21-bp155.2.10 info | GA Release | 2023-05-17 | 15 SP5 |
|
|
0.21-bp154.1.22 info | GA Release | 2022-05-09 | 15 SP4 |
|
|
0.21-bp153.1.14 info | GA Release | 2021-03-06 | 15 SP3 |
|
|
0.21-bp152.3.15 info | GA Release | 2020-04-16 | 15 SP2 |
|
|
0.21-bp151.3.1 info | GA Release | 2019-07-16 | 15 SP1 |
|
|
0.21-bp151.2.14 info | GA Release | 2019-05-18 | 15 SP1 |
|
|
0.21-bp150.2.4 info | GA Release | 2018-07-30 | 15 |
|
|