Skip to main content
Version: 4.5

Class: MemoryCacheAdapter#

core.MemoryCacheAdapter

Implements#

Constructors#

constructor#

+ new MemoryCacheAdapter(options: { expiration: number }): MemoryCacheAdapter

Parameters:#

NameType
optionsobject
options.expirationnumber

Returns: MemoryCacheAdapter

Defined in: packages/core/src/cache/MemoryCacheAdapter.ts:5

Properties#

data#

Private Readonly data: Map<string, { data: any ; expiration: number }>

Defined in: packages/core/src/cache/MemoryCacheAdapter.ts:5

Methods#

clear#

clear(): Promise<void>

Clears all items stored in the cache.

Returns: Promise<void>

Implementation of: CacheAdapter

Defined in: packages/core/src/cache/MemoryCacheAdapter.ts:36


get#

get(name: string): Promise<undefined | T>

Gets the items under name key from the cache.

Parameters:#

NameType
namestring

Returns: Promise<undefined | T>

Implementation of: CacheAdapter

Defined in: packages/core/src/cache/MemoryCacheAdapter.ts:12


set#

set(name: string, data: any, origin: string, expiration?: number): Promise<void>

Sets the item to the cache. origin is used for cache invalidation and should reflect the change in data.

Parameters:#

NameType
namestring
dataany
originstring
expiration?number

Returns: Promise<void>

Implementation of: CacheAdapter

Defined in: packages/core/src/cache/MemoryCacheAdapter.ts:29

Last updated on by Renovate Bot