Libraries v5.0.0
    Preparing search index...

    Interface ServerCacheOptions

    Configuration for cacheResponse.

    interface ServerCacheOptions {
        defaultTtl?: number;
        maxEntries?: number;
        maxResponseBytes?: number;
        ttlByTag?: Record<string, number>;
    }
    Index
    defaultTtl?: number

    Default TTL in milliseconds for tags without an explicit TTL. Defaults to 60000 (60 seconds).

    maxEntries?: number

    Maximum retained cache keys. Default: 1000 (oldest keys are evicted).

    maxResponseBytes?: number

    Maximum retained response body size. Default: 65,536 bytes.

    ttlByTag?: Record<string, number>

    Per-tag TTL overrides: { [tagName]: ttlMs }.