Skip to main content

Class: LRUCache<T>

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

Type parameters

Name
T

Constructors

constructor

new LRUCache<T>(max?)

Type parameters

Name
T

Parameters

NameTypeDefault value
maxnumber10

Defined in

packages/core/src/cache.ts:9

Methods

clear

clear(): void

Returns

void

Defined in

packages/core/src/cache.ts:14


delete

delete(key): void

Parameters

NameType
keystring

Returns

void

Defined in

packages/core/src/cache.ts:36


get

get(key): undefined | T

Parameters

NameType
keystring

Returns

undefined | T

Defined in

packages/core/src/cache.ts:18


set

set(key, val): void

Parameters

NameType
keystring
valT

Returns

void

Defined in

packages/core/src/cache.ts:27