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

    Function waitForCacheStable

    • Wait for cache state to settle (no changes across consecutive polls).

      Used for OPFS write settling: the L2 store debounces writes asynchronously, so reading stats immediately after a load returns mid-flight values. Two (or more) consecutive identical reads of the cache size signature indicate pending writes have flushed.

      Returns gracefully if the L2 layer is unavailable (no OPFS in this browser).

      Parameters

      • page: Page
      • options: { stableReads?: number; pollMs?: number; timeout?: number } = {}

      Returns Promise<void>