fgb-vt - v1.0.6
    Preparing search index...

    Interface ByteCache

    A key-value store for immutable byte blocks.

    Implementations may be synchronous or asynchronous and may drop entries at any time (e.g. on eviction); a missing entry is simply re-read. Values handed to ByteCache.set and returned by ByteCache.get are treated as read-only by fgb-vt.

    interface ByteCache {
        delete(key: string): void | Promise<void>;
        get(
            key: string,
        ):
            | Uint8Array<ArrayBufferLike>
            | Promise<Uint8Array<ArrayBufferLike> | undefined>
            | undefined;
        set(key: string, value: Uint8Array): void | Promise<void>;
    }

    Implemented by

    Index
    • Remove the entry under key, if any.

      Parameters

      • key: string

      Returns void | Promise<void>

    • Return the bytes stored under key, or undefined if absent.

      Parameters

      • key: string

      Returns
          | Uint8Array<ArrayBufferLike>
          | Promise<Uint8Array<ArrayBufferLike> | undefined>
          | undefined

    • Store value under key.

      Parameters

      • key: string
      • value: Uint8Array

      Returns void | Promise<void>