Skip to main content

Class: InMemoryPayloadCache

Experimental

In-memory, LRU PayloadCache. This is the default payload cache.

Implements​

Constructors​

Constructor​

new InMemoryPayloadCache(__namedParameters?): InMemoryPayloadCache

Experimental

Parameters​

__namedParameters?​

InMemoryPayloadCacheOptions

Returns​

InMemoryPayloadCache

Methods​

get()​

get(key): Promise<IPayload | undefined>

Experimental

Returns the payload stored under key, or undefined on a miss.

Parameters​

key​

string

Returns​

Promise<IPayload | undefined>

Implementation of​

PayloadCache.get


set()​

set(key, payload): Promise<boolean>

Experimental

Returns whether the cache accepted payload.

Parameters​

key​

string

payload​

IPayload

Returns​

Promise<boolean>

Implementation of​

PayloadCache.set