Docs
API
Classes
CFWorkerKVCache

Class: CFWorkerKVCache

cache/cfw-kv/src.CFWorkerKVCache

Implements

Table of contents

Constructors

Methods

Constructors

constructor

new CFWorkerKVCache(config)

Parameters

NameType
configObject
config.loggerLogger
config.namespacestring

Methods

delete

delete(key): Promise<void>

Parameters

NameType
keystring

Returns

Promise<void>

Implementation of

KeyValueCache.delete


get

get<T>(key): Promise<T>

Type parameters

Name
T

Parameters

NameType
keystring

Returns

Promise<T>

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
valueany
options?Object
options.ttl?number

Returns

Promise<void>

Implementation of

KeyValueCache.set