thesportsdb-client
    Preparing search index...

    Interface ResponseCache

    Stores raw response bodies. Keys never contain an API key. Implement it for Redis, KV stores, localStorage, etc.; methods may return promises.

    interface ResponseCache {
        get(
            key: string,
        ): string | Promise<string | null | undefined> | null | undefined;
        set(key: string, body: string, ttlMs: number): void | Promise<void>;
    }

    Implemented by

    Index
    • Parameters

      • key: string

      Returns string | Promise<string | null | undefined> | null | undefined

    • Parameters

      • key: string
      • body: string
      • ttlMs: number

      Returns void | Promise<void>