bulge_bounded_cache 
A cache of at most limit entries that drops the oldest first. A dropped entry only costs its computation again.
Vars | |
| cursor | Where the next key goes once the cache is full: the oldest. |
|---|---|
| entries | Key -> value. Lazy. |
| keys | Keys in the order they were stored, for dropping the oldest. Lazy. |
| limit | Most entries kept. |
Procs | |
| clear | Empties the cache. |
| fetch | The value stored for key, or null. |
| store_value | Stores value for key unless one is stored already, and returns the stored one. |
Var Details
cursor 
Where the next key goes once the cache is full: the oldest.
entries 
Key -> value. Lazy.
keys 
Keys in the order they were stored, for dropping the oldest. Lazy.
limit 
Most entries kept.
Proc Details
clear
Empties the cache.
fetch
The value stored for key, or null.
store_value
Stores value for key unless one is stored already, and returns the stored one.