Class ArtifactCache

Cache to store model related data, implemented with the Cache API.

Hierarchy

  • ArtifactCache

Implements

Constructors

Methods

  • Fetch data from url and add into cache. If already exists in cache, should return instantly.

    Note

    This is an async function.

    Parameters

    • url: string
    • Optional storetype: string

    Returns Promise<void>

  • fetch the corresponding url object in response or stored object format

    Parameters

    • url: string

      url

    • Optional storetype: string

      the storage type for indexedDB

    Returns Promise<any>

    response in json, arraybuffer or pure response format

  • Determine if all keys exist in the cache

    Parameters

    • keys: string[]

      the url key list of the strings

    Returns Promise<boolean>

    boolean value indicate if all keys are in cache

  • Convert the Response object to the expected storetype instead

    Parameters

    • response: Response
    • Optional storetype: string

    Returns Promise<any>

Generated using TypeDoc