Skip to main content
Version: Next

MemoryCache

MemoryCache extends CacheProvider

new MemoryCache()

Methods

public clear(): Promise<void>

public delete(key): Promise<void>

ParameterTypeOptional
keystring

public exists(key): Promise<boolean>

ParameterTypeOptional
keystring

public expire(key, ttl): Promise<void>

ParameterTypeOptional
keystring
ttlnumber

public get(key): Promise<undefined | CacheEntry<T>>

ParameterTypeOptional
keystring

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

ParameterTypeOptional
keystring
valueT
ttlnumber