Skip to main content

core.lrucache

Home > @medplum/core > LRUCache

LRUCache class

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

Signature:

export declare class LRUCache<T> 

Constructors

ConstructorModifiersDescription
(constructor)(max)Constructs a new instance of the LRUCache class

Methods

MethodModifiersDescription
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.