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

    Result of cache setup: the three layers and a ready-to-open store.

    interface CacheSetupResult {
        l0Cache: DecompressedChunkCache | null;
        sliceCache: SliceCache | null;
        cachingStore: MultiLevelCachingStore | null;
        chunkPacks: PackedChunkSource | null;
        rawStore: AsyncReadable;
        sidecarSourceStore: () => AsyncReadable;
        telemetryState: CacheTelemetryState;
        budgets: CacheBudgets;
        rootDocument: Promise<RootDocumentFetch> | null;
        releaseRootDocument: () => void;
        rootIndexFromNetwork: () => boolean;
    }
    Index
    l0Cache: DecompressedChunkCache | null
    sliceCache: SliceCache | null

    Shared SliceCache ("S-cache") for per-slice decoded-geometry reuse.

    cachingStore: MultiLevelCachingStore | null
    chunkPacks: PackedChunkSource | null

    The source under the caching store that serves a packed store's small nodes from one request each (luxar optimize --pack); hand it the store's index with adoptChunkPacks. null without the caching store (?noCache), where every read is plain.

    rawStore: AsyncReadable
    sidecarSourceStore: () => AsyncReadable

    A fresh sidecar read, sharing the already-open archive reader for zip stores.

    telemetryState: CacheTelemetryState

    Resolved cache telemetry state for the UI monitor. Reflects the actual policy decision the cache stack made:

    • disabled-no-cache: URL ?noCache flag.
    • disabled-config : appConfig.cache.enabled === false.
    • enabled : at least one tier (L0 or L1/L2) is active. Pushed to the monitor via setCacheTelemetryState() in wireMonitorAfterLoad.
    budgets: CacheBudgets

    The resolved per-tier budgets (and their source: heap / explicit / device-class / fixed) — surfaced so the Settings popover can show the user what their budget actually resolved to.

    rootDocument: Promise<RootDocumentFetch> | null

    The load-time root-document fetch validation and the store open share (cache/root-document-prefetch.ts), or null for a URL it does not apply to (zipped / presigned / non-http). The loader reads the response's ETag from it for the identity watchdog.

    releaseRootDocument: () => void

    Stop answering from rootDocument and drop the registry's reference — call once the root has been opened. Later root reads (an invalidation) then reach the server as before. Idempotent.

    rootIndexFromNetwork: () => boolean

    True when the root metadata the store opened with came from the network this load (no cache tier served it), so its consolidated index is current. False when L2 served it: L2 revalidates by content_hash alone, which a sidecar edit such as luxar env attach leaves unchanged.