rmapi-js
    Preparing search index...

    Interface Store

    blobs by the hex sha-256 of their bytes: document bodies, and the pages and copies the offline library works on

    A mirror rather than a cache: nothing is dropped except by retain. has and put take many blobs at once, since the core gathers every call made in the same moment into one, of at most the platform's maxBatch blobs.

    interface Store {
        get(hash: string): Promise<Uint8Array<ArrayBufferLike> | undefined>;
        has(hashes: string[]): Promise<boolean[]>;
        put(blobs: [string, Uint8Array<ArrayBufferLike>][]): Promise<void>;
        retain(keep: string[]): Promise<void>;
    }

    Implemented by

    Index
    • a blob, or undefined if it is not held

      Parameters

      • hash: string

      Returns Promise<Uint8Array<ArrayBufferLike> | undefined>

    • whether each blob is held, in the order asked

      Parameters

      • hashes: string[]

      Returns Promise<boolean[]>

    • stores every blob under its hash, all of them or none

      Parameters

      • blobs: [string, Uint8Array<ArrayBufferLike>][]

      Returns Promise<void>

    • deletes every blob keep does not name

      Parameters

      • keep: string[]

      Returns Promise<void>