DialCache TypeScript API - v0.26.0
    Preparing search index...

    Class DialCacheKeyConfig

    Index
    • Parameters

      • config: {
            coalesce?: boolean;
            ramp?: Partial<Record<CacheLayer, number>>;
            remoteReadTimeoutMs?: number;
            requestLocal?: boolean;
            shadow?: ShadowConfig;
            staleOnErrorMaxAgeSec?: number;
            ttlSec?: Partial<Record<CacheLayer, number>>;
        }

      Returns DialCacheKeyConfig

    coalesce?: boolean

    Share one in-flight execution across concurrent same-key callers, in both the request-local and process coalescing scopes. Defaults to true. When false, each caller performs its own layer reads, its own fallback with an independent fallback deadline, and its own cache writes.

    remoteReadTimeoutMs?: number

    Maximum time DialCache waits for a remote read before failing open to the source of truth. Overrides the instance default for this use case.

    requestLocal?: boolean

    Memoize successful values for the lifetime of the outermost enabled scope. Request-local caching is disabled by default and has no TTL or ramp.

    shadow?: ShadowConfig

    Per-use-case runtime policy for detached Redis shadow work.

    staleOnErrorMaxAgeSec?: number

    Exclusive logical Redis-frame age ceiling in seconds. A value retained by the initial read may be returned after an eligible source rejection only while its age is less than this value; an age exactly at the ceiling is a miss. Omission disables recovery by default and inherits in runtime overlays; zero explicitly disables an inherited policy. A positive value requires a smaller positive remote TTL and may not exceed 31,536,000 seconds (365 days). Tracked values retain their separate one-hour physical TTL cap.

    ttlSec: LayerConfig

    Per-layer TTLs in seconds, from 1 through 31,536,000 (365 days).

    • The explicit cache-invocation kill switch: request-local caching, stale recovery, and shadow work off, with both shared layers ramped to 0. As a provider overlay it disables every inherited path instead of relying on field omission. It does not cancel admitted work or disable explicit maintenance operations.

      Returns DialCacheKeyConfig