Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • ResourceCacheClient

Implements

Index

Constructors

constructor

Methods

createUrlForContent

  • createUrlForContent(contentParts: (string | ArrayBuffer | ArrayBufferView)[], mediaType: string, forceDataUrl: boolean): string
  • Create a Blob URL or a data URL to the specified contents.

    The result is cached until this instance is destroyed and no other ResourceCacheClient have fetched the same resources.

    Parameters

    • contentParts: (string | ArrayBuffer | ArrayBufferView)[]
    • mediaType: string
    • forceDataUrl: boolean

    Returns string

destroy

  • destroy(): void
  • Destroys this client, evicting cached Resources from the ResourceCacheHost if no other ResourceCacheClient have fetched the same resources. This will not destroy the backing ResourceCacheHost and backing resource provider.

    Returns void

fetchBlob

  • Fetch a resource as a Blob. The result is cached until this instance is destroyed and no other ResourceCacheClient have fetched the same resources.

    Parameters

    • url: string | URL
    • accept: string[]

    Returns Promise<IResourceCacheResponse<Blob>>

fetchBrowserNativeUrl

  • fetchBrowserNativeUrl(url: string | URL, accept: string[], forceDataUrl: boolean): Promise<IResourceCacheResponse<string>>
  • Fetch a resource as URL that can be requested natively by the browser, like for example with the src attribute for an image element, etc.

    The result is cached until this instance is destroyed and no other ResourceCacheClient have fetched the same resources.

    Parameters

    • url: string | URL
    • accept: string[]
    • forceDataUrl: boolean

    Returns Promise<IResourceCacheResponse<string>>

fetchText

  • Fetch a resource as a text. The result is cached until this instance is destroyed and no other ResourceCacheClient have fetched the same resources.

    Parameters

    • url: string | URL
    • accept: string[]

    Returns Promise<IResourceCacheResponse<string>>

fetchUint8Array

  • Fetch a resource as a Uint8Array. The result is cached until this instance is destroyed and no other ResourceCacheClient have fetched the same resources.

    Parameters

    • url: string | URL
    • accept: string[]

    Returns Promise<IResourceCacheResponse<Uint8Array>>

isDestroyed

  • isDestroyed(): boolean
  • If this instance has been destroyed. This does not indicate if the backing cache host or the backing resource provider has been destroyed.

    Returns boolean

Generated using TypeDoc