CacheStore
Interface defining a cache store. Implement this interface to create a custom cache store.
interface CacheStore {
set<T>(key: string, value: T, options?: number | CacheStoreSetOptions<T>): Promise<void> | void
get<T>(key: string): Promise<T | undefined> | T | undefined
del(key: string)?: void | Promise<void>
}
Methods
set() | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Create a key/value pair in the cache. |
||||||||||||
Parameters
Returns
|
get() |
---|
Retrieve a key/value pair from the cache. |
del() |
---|
Destroy a key/value pair from the cache. |