method CacheService.prototype.set
CacheService.prototype.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 { CacheService } from "cache-plugin/src/index.ts";