Docs
API
Classes
RedisCache

Class: RedisCache<V>

cache/redis/src.RedisCache

Type parameters

NameType
Vstring

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new RedisCache<V>(options)

Type parameters

NameType
Vstring

Parameters

NameType
optionsRedisConfig & { pubsub: MeshPubSub }

Methods

delete

delete(key): Promise<boolean>

Parameters

NameType
keystring

Returns

Promise<boolean>

Implementation of

KeyValueCache.delete


get

get(key): Promise<V>

Parameters

NameType
keystring

Returns

Promise<V>

Implementation of

KeyValueCache.get


getKeysByPrefix

getKeysByPrefix(prefix): Promise<string[]>

Parameters

NameType
prefixstring

Returns

Promise<string[]>

Implementation of

KeyValueCache.getKeysByPrefix


set

set(key, value, options?): Promise<void>

Parameters

NameType
keystring
valueV
options?KeyValueCacheSetOptions

Returns

Promise<void>

Implementation of

KeyValueCache.set