Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Interface MultiLevelCachingStoreOptions

    Configuration for the memory, OPFS, and source-backed cache tiers.

    interface MultiLevelCachingStoreOptions {
        l1MaxSize?: number;
        l2MaxSize?: number;
        debug?: boolean;
        noCache?: boolean;
        noOpfs?: boolean;
        clearCache?: boolean;
        opfsWriteConcurrency?: number;
        opfsWriteQueueMax?: number;
        opfsWriteQueueMaxBytes?: number;
    }
    Index
    l1MaxSize?: number

    L1 memory cache size in bytes (default: 100MB)

    l2MaxSize?: number

    L2 OPFS cache size in bytes (default: 2GB)

    debug?: boolean

    Enable debug logging (default: false)

    noCache?: boolean

    Disable both cache tiers (e.g. driven by ?noCache). Default false.

    noOpfs?: boolean

    Skip the L2 OPFS tier entirely (e.g. driven by ?noOpfs); L1 stays on. The deterministic sibling of the OPFSStore circuit breaker for environments whose OPFS is known to stall. Default false.

    clearCache?: boolean

    Clear caches on init (e.g. driven by ?clearCache). Default false.

    opfsWriteConcurrency?: number

    Background L2 write-queue concurrency cap. Defaults to config.cache.opfsWriteConcurrency. Exposed mainly so tests can inject a tiny cap.

    opfsWriteQueueMax?: number

    Background L2 write-queue max pending depth. Defaults to config.cache.opfsWriteQueueMax.

    opfsWriteQueueMaxBytes?: number

    Max bytes retained by pending L2 writes. Defaults to computeOpfsWriteQueueBudgetBytes — the non-cache heap remainder's share, no longer derived from the L1 budget because the pending buffer IS the L1 entry's buffer (see the enqueue site in getResult), so an L1-resident pending write costs a reference rather than a second copy. Pass a real budget when overriding: the queue clamps a non-positive or non-finite value to a 1-BYTE cap, i.e. every write drops — 0 does not mean "unbounded".