Skip to content

Latest commit

 

History

History
77 lines (44 loc) · 1.12 KB

File metadata and controls

77 lines (44 loc) · 1.12 KB

timed-memory-cache / Exports / ICahceOptions

Interface: ICahceOptions<T>

Type parameters

Name
T

Table of contents

Properties

Properties

onRemove

Optional onRemove: (key: string, value: T) => void

Called after item is removed from the cache

Type declaration:

▸ (key: string, value: T): void

Parameters:

Name Type
key string
value T

Returns: void

Defined in: index.ts:13

Defined in: index.ts:13


onSet

Optional onSet: (key: string, value: T) => void

Called after adding a new item into the cache

Type declaration:

▸ (key: string, value: T): void

Parameters:

Name Type
key string
value T

Returns: void

Defined in: index.ts:9

Defined in: index.ts:9


ttl

ttl: number

time to live, defines cache entry lifetime, defualt 60000ms (1min)

Defined in: index.ts:5