functai for TypeScript - v0.1.0
    Preparing search index...

    Interface ReplyCache

    Where replies are kept, when it is your own: a Map works, or any store with get and set (or put), sync or async (Redis, a KV store, …). It is given plain JSON under string keys. delete (or discard) forgets a kept reply that no longer reads; claim(key) and unclaim(key) make one flight per key across the processes that share it. durable: false says it keeps nothing beyond the process (then a call whose logContent drops a field may use it).

    interface ReplyCache {
        durable?: boolean;
        claim?(key: string, signal?: AbortSignal): unknown;
        delete?(key: string): unknown;
        discard?(key: string): unknown;
        get(key: string): unknown;
        put?(key: string, reply: Rec): unknown;
        set?(key: string, reply: Rec): unknown;
        unclaim?(key: string): unknown;
    }

    Implemented by

    Index
    durable?: boolean
    • Parameters

      • key: string
      • Optionalsignal: AbortSignal

      Returns unknown

    • Parameters

      • key: string

      Returns unknown

    • Parameters

      • key: string

      Returns unknown

    • Parameters

      • key: string

      Returns unknown

    • Parameters

      • key: string
      • reply: Rec

      Returns unknown

    • Parameters

      • key: string
      • reply: Rec

      Returns unknown

    • Parameters

      • key: string

      Returns unknown