tutti-api - v2.1.0
    Preparing search index...

    Interface SessionStore

    Persists session snapshots under a string key. Implementations are interchangeable (in-memory, file, Redis, …) so callers depend on this interface, never a concrete store.

    Works with plain SessionSnapshot JSON (from session.toJSON()), not the Session class — keeping persistence decoupled from the client.

    interface SessionStore {
        delete(key: string): Promise<void>;
        keys(): Promise<string[]>;
        load(key: string): Promise<SessionSnapshot | null>;
        save(key: string, snapshot: SessionSnapshot): Promise<void>;
    }

    Implemented by

    Index

    Methods

    • Remove the snapshot for key (no-op if absent).

      Parameters

      • key: string

      Returns Promise<void>