Skeudenn / lib/lru-cache / LruCache
Interface: LruCache<V> ​
Defined in: src/lib/lru-cache.ts:7
A cache that keeps at most a fixed number of entries, dropping the one used least recently.
Type Parameters ​
V ​
V
Properties ​
size ​
readonlysize:number
Defined in: src/lib/lru-cache.ts:13
Number of entries held.
Methods ​
get() ​
get(
key):V|undefined
Defined in: src/lib/lru-cache.ts:9
The value for key, which then counts as the most recently used; undefined when absent.
Parameters ​
key ​
string
Returns ​
V | undefined
put() ​
put(
key,value):void
Defined in: src/lib/lru-cache.ts:11
Stores value under key as the most recently used, dropping the least recently used entry beyond the capacity.
Parameters ​
key ​
string
value ​
V
Returns ​
void