Cacheable is the interface to something that can be stored into the DataCache. The 'npm run gen_cache' tool will look for module-scope variables of this interface, with the name d.

Type Parameters

  • Data

Hierarchy

  • Cacheable

Implemented by

Properties

Methods

Properties

path: string

the globally unique path for the cacheable data

Methods

  • build() builds the cacheable data. This is assumed to be an expensive operation and will only happen if the cache does not already contain the built data.

    Returns Promise<Data>

  • deserialize() is the inverse of serialize(), decoding the binary representation back to a Data object.

    Parameters

    • binary: Uint8Array

    Returns Data

  • serialize() encodes data to a binary representation so that it can be stored in a cache file.

    Parameters

    • data: Data

    Returns Uint8Array

Generated using TypeDoc