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

    Interface OPFSMetadata

    Metadata structure persisted to OPFS for L2 cache management. Stored in _cache_meta.json within each dataset's OPFS directory.

    interface OPFSMetadata {
        baseUrl: string;
        entries: [string, { size: number; order: number }][];
        totalSize: number;
        orderCounter: number;
        contentHash: string | null;
        encodingVersion?: number;
        validationMode?: CacheValidationMode;
        lastValidatedAt?: number;
    }
    Index
    baseUrl: string

    Original dataset URL (for listDatasets() debugging)

    entries: [string, { size: number; order: number }][]

    L2 index entries: [key, {size, order}]

    totalSize: number

    Total size of all cached entries in bytes

    orderCounter: number

    LRU order counter (monotonically increasing)

    contentHash: string | null

    Content hash of root .zattrs for cache invalidation

    encodingVersion?: number

    Filename-encoding version. Bumped when keyToFileName() output changes so a loadMetadata() with a stale version invalidates the directory rather than reading old-format files. Absent (undefined) means version 1 (legacy btoa(key) Latin-1 only).

    validationMode?: CacheValidationMode

    Validation mode used at last init. Persisted so a session that loaded with TTL semantics can re-evaluate the TTL window on the next visit; persisted alongside lastValidatedAt.

    lastValidatedAt?: number

    Wall-clock millis at last successful source validation, or the first-seen baseline under ttl/none — seeded once when unset and NOT advanced by later no-token checks, so the TTL age grows monotonically.