core.lrucache | Medplum

LRUCache class ​

LRU cache (least recently used) Source: https://stackoverflow.com/a/46432113

Signature:

export declare class LRUCache<T>

Constructors ​

Constructor Modifiers Description
(constructor)(max) Constructs a new instance of the LRUCache class

Methods ​

Method Modifiers Description
clear() Deletes all values from the cache.
delete(key) Deletes the value for the given key.
get(key) Returns the value for the given key.
keys() Returns the list of all keys in the cache.
set(key, val) Sets the value for the given key.