Member Junction
    Preparing search index...

    Interface LocalCacheManagerConfig

    Configuration for the LocalCacheManager

    interface LocalCacheManagerConfig {
        defaultTTLMs: number;
        enabled: boolean;
        evictionPolicy: "lru" | "lfu" | "fifo";
        evictionSweepIntervalMs: number;
        maxEntryPercentOfCache: number;
        maxPercentOfCachePerEntity: number;
        maxSizeBytes: number;
        verboseLogging: boolean;
    }
    Index

    Properties

    defaultTTLMs: number

    Default TTL in milliseconds (default: 0 = no TTL, rely on event-based invalidation)

    enabled: boolean

    Whether caching is enabled

    evictionPolicy: "lru" | "lfu" | "fifo"

    Eviction policy when cache is full

    evictionSweepIntervalMs: number

    Interval in milliseconds for the periodic eviction sweep. Catches entries that should have been evicted (TTL expired) but weren't because no new stores triggered eviction. 0 = disabled. Default: 300000 (5 minutes).

    maxEntryPercentOfCache: number

    Maximum size of any single cache entry, expressed as a percentage of maxSizeBytes. An entry estimated larger than this cap is not cached at all — the write is skipped (logged, data still returned to the caller uncached). Without this cap, storing an oversized entry is strictly worse than not caching it: evictIfNeeded frees max(incoming, 10% of budget), so an entry larger than the whole budget evicts EVERY other entry and still cannot be retained within budget — a full cache wipe on every store. Applies to RunView and RunQuery entries. Default: 25. Set to 0 to disable.

    maxPercentOfCachePerEntity: number

    Maximum percentage of total cache memory (maxSizeBytes) that any single entity's cached results can occupy. When exceeded, the least-recently-accessed entries for that entity are evicted. Default: 50. Set to 0 to disable.

    maxSizeBytes: number

    Maximum cache size in bytes (default: 150MB)

    verboseLogging: boolean

    Enable verbose cache logging (hits, misses, evictions, memory stats). Default: false.