Skip to content

@toolcog/util/cache

Toolcog utilities

Classes

LruCache<K, V>

Type Parameters

K

V

Constructors

new LruCache()

new LruCache<K, V>(capacity): LruCache<K, V>

Parameters

capacity: number

Returns

LruCache<K, V>

Defined in

lru.ts:21

Accessors

capacity

get capacity(): number

Returns

number

Defined in

lru.ts:28

Methods

clear()

clear(): void

Returns

void

Defined in

lru.ts:67

delete()

delete(key): boolean

Parameters

key: K

Returns

boolean

Defined in

lru.ts:57

get()

get(key): undefined | V

Parameters

key: K

Returns

undefined | V

Defined in

lru.ts:32

set()

set(key, value): void

Parameters

key: K

value: V

Returns

void

Defined in

lru.ts:41