The media caching API.


- Available since v2.26.

interface Cache {
    network: NetworkInterceptorController;
    status: CacheStatus;
    tasks: CachingTaskList;
    addEventListener<TType>(type: TType | readonly TType[], listener: EventListener<CacheEventMap[TType]>): void;
    createTask(source: SourceDescription, parameters: CachingTaskParameters): CachingTask;
    removeEventListener<TType>(type: TType | readonly TType[], listener: EventListener<CacheEventMap[TType]>): void;
}

Hierarchy (view full)

Properties

The cache's network API which allows intercepting requests and responses made by the cache.

status: CacheStatus

The current status of the cache.

List of caching tasks which control the caching of media.

Methods