Options
All
  • Public
  • Public/Protected
  • All
Menu

Wraps a ResourceProvider and manages a cache of fetched Resources. The ResourceCacheHost is used by ResourceCacheClients to retrieve resources from the backing resource provider.

The ResourceCacheHost keeps Resource responses cached as long as any ResourceCacheClient keeps references to them.

For example, if multiple ResourceCacheClients requests the same resource, only one request will be made to the backing ResourceProvider and its response will be reused.

The uniqueness of a Resource is defined by its URL and its accept header.

A Resource is evicted from the cache when all ResourceCacheClients that have requested that resource have been destroyed.

Hierarchy

  • IResourceCacheHost

Implemented by

Index

Methods

destroy

  • destroy(): void
  • Destroys this cache host.

    Returns void

getBackingResourceProvider

Generated using TypeDoc