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

    Interface DialCacheConfig

    interface DialCacheConfig {
        cacheConfigProvider?: CacheConfigProvider;
        localMaxSize?: number;
        logger?: Logger;
        metrics?: DialCacheMetricsAdapter;
        namespace?: string;
        redis?: RedisConfig;
        shadowMaxInFlight?: number;
        shouldAttemptStaleRecovery?: StaleRecoveryPredicate;
    }
    Index
    cacheConfigProvider?: CacheConfigProvider
    localMaxSize?: number

    Maximum local entries across every use case in this DialCache instance. Must be a nonnegative safe integer. Zero disables local storage. Defaults to 10,000.

    logger?: Logger
    namespace?: string

    Logical namespace used in cache keys, invalidation identity, ramp sampling, and metrics. Defaults to "urn". May not contain { or }.

    redis?: RedisConfig
    shadowMaxInFlight?: number

    Maximum number of scheduled or running shadow jobs per DialCache instance, including shadow-owned work that outlives a DialCache deadline. There is no queue; excess jobs are dropped and measured. Must be a positive safe integer. Defaults to 1.

    shouldAttemptStaleRecovery?: StaleRecoveryPredicate

    Instance default for deciding whether a source rejection may use a retained Redis value. Must be synchronous. Per-use-case policy overrides and replaces this callback; omission admits only DialCache's FallbackTimeoutError. Throws, thenables, and non-boolean results deny recovery without replacing the source rejection. Custom predicates should narrowly admit transient, retriable infrastructure failures and deny authoritative outcomes such as auth, permission, entitlement, revocation, deletion, not-found, validation, and programmer errors. Use per-use-case overrides when particular data requires a stricter policy.