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

    Module data/scene-loader/cache/cache-api

    Cache surface helpers for the scene loader.

    The SceneLoader owns three cache layers:

    • L0: in-memory DecompressedChunkCache of decoded zarr chunks (skips the Blosc decompression on reuse).
    • L1: in-memory metadata/raw-chunk cache inside MultiLevelCachingStore.
    • L2: persistent OPFS cache inside the same store.

    These pure functions implement the typed get/clear/list API that the SceneLoader exposes (getCacheStats, listCachedDatasets, clearL0Cache, clearL1Cache, clearL2Cache, clearAllCaches). Pulling them out of the SceneLoader class lets the cache surface be tested in isolation and gives a single home for cache-API additions (eviction tuning, hit-rate telemetry, etc.).

    Each helper gracefully no-ops when the corresponding cache layer is null — matching the behavior the SceneLoader had inline, where caches are absent under ?noCache or when the global config disables them.

    CacheStatsSnapshot
    getCacheStats
    listCachedDatasets
    clearL0Cache
    clearL1Cache
    clearL2Cache
    clearAllCaches