The function
to call for every entry from the oldest to the newer. This function takes
3 arguments (the entry value, the entry key and the LRUCache object).
The return value is ignored.
(arg0, arg1, arg2): unknown
Parameters
arg0: any
arg1: string
arg2: LRUCache<any>
Returns unknown
Returns void
get
get(key, options?): any
Parameters
key: string
Key.
Optionaloptions: any
Options (reserved for subclasses).
Returns any
Value.
getCount
getCount(): number
Returns number
Count.
getKeys
getKeys(): string[]
Returns string[]
Keys.
getValues
getValues(): any[]
Returns any[]
Values.
peek
peek(key): any
Return an entry without updating least recently used time.
Parameters
key: string
Key.
Returns any
Value.
peekFirstKey
peekFirstKey(): string
Get the key of the newest item in the cache. Throws if the cache is empty.
Returns string
The newest key.
peekLast
peekLast(): any
Returns any
Last value.
peekLastKey
peekLastKey(): string
Returns string
Last key.
pop
pop(): any
Returns any
value Value.
pruneExceptNewestZ
pruneExceptNewestZ(): void
Prune all tiles from the cache that don't have the same z as the newest tile.
Desired max cache size after expireCache(). If set to 0, no cache entries will be pruned at all.