method ICacheStore.set
ICacheStore.set<T>(
key: string,
value: T,
ttlSeconds?: number
): Promise<void>

Stores a value.

Type Parameters

The value type

Parameters

key: string

Cache key

value: T

Value to store

optional
ttlSeconds: number

Time-to-live in seconds; omit for the store default

Return Type

Promise<void>

Usage

import { type ICacheStore } from "cache-plugin/src/index.ts";