method CacheSessionStore.prototype.write
CacheSessionStore.prototype.write(
id: string,
data: SessionData,
ttlMs: number
): Promise<void>

Writes a session payload, replacing any existing one.

Parameters

id: string

Session identifier

data: SessionData

The payload to persist

ttlMs: number

Time-to-live in milliseconds from now

Return Type

Promise<void>

Usage

import { CacheSessionStore } from "session-plugin/src/index.ts";