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

    Interface CacheTiersEnabled

    Compute two-sided, heap-aware budgets for the L0 / L1 / S-cache tiers.

    Allocation (when the heap is known): pool = heap × targetHeapUsage × CACHE_SHARE_OF_TARGET sliceMin= clamp(pool × SLICE_MIN_FRACTION, SLICE_ABS_MIN, sliceConfig) // heap-relative floor L0, L1 = their config ceilings, scaled DOWN proportionally only if (pool − sliceMin) cannot seat both — render-proximal priority: the S-cache floor is protected first, the chunk caches shrink. slice = clamp(pool − L0 − L1, sliceMin, SLICE_CAP) // residual → scales UP

    Override for the device heap limit (tests). When omitted, readHeapLimitBytes is consulted.

    Explicit total cache pool (L0+L1+S-cache) in bytes, from ?cacheBudgetMB= or the native launcher. Takes precedence over the heap: this is how the WKWebView app / Safari (no performance.memory) still get a real budget instead of the tiny fixed fallback. Split across tiers by the same rule as the heap path.

    Total pool to use when there is NO explicit override AND no measurable heap — typically deviceClassPoolBytes. Lets WebKit without an override still get a device-class-appropriate budget rather than the tiny fixed sizes.

    Resolution order: explicit override → measured heap → device-class fallback → fixed config sizes (source: 'fixed', e.g. non-browser / no device signals).

    Which tiers are actually active this session. A disabled tier gets a 0 budget and does NOT reserve any pool: e.g. ?noSliceCache frees the S-cache floor back to the chunk caches, and disabling L0 gives its share to the S-cache. Defaults to all enabled (identical to the pre-flag behavior).

    interface CacheTiersEnabled {
        l0?: boolean;
        l1?: boolean;
        slice?: boolean;
    }
    Index
    l0?: boolean
    l1?: boolean
    slice?: boolean