logo
THEOplayer
ABR
Ads
Caching
AddCachingTaskEventcacheCacheCacheEventMapCacheStatusCacheTaskStatusCachingTaskEventMapCachingTaskCachingTaskLicenseCachingTaskListCachingTaskListEventMapCachingTaskParametersRemoveCachingTaskEvent
Content protection
Analytics
Casting
Media and Text Tracks
Miscellaneous
Verizon Media
Source
Events
SSAI
Network
Presentation
Player
UI
VR

THEOplayer > Cache

Cache interface

Inherits from EventDispatcher<CacheEventMap> . See parent page for inherited properties and methods.

The media caching API.

Signature:

export interface Cache extends EventDispatcher<CacheEventMap> 

Remarks


- Available since v2.26.

Properties

Property

Type

Description

network

NetworkInterceptorController

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

status

CacheStatus

The current status of the cache.

tasks

CachingTaskList

List of caching tasks which control the caching of media.

Methods

Method

Description

createTask​(source: SourceDescription, parameters: CachingTaskParameters): CachingTask

Create a caching task which controls the caching of media.

Property Details

network

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

Signature:

readonly network: NetworkInterceptorController;

status

The current status of the cache.

Signature:

readonly status: CacheStatus;

tasks

List of caching tasks which control the caching of media.

Signature:

readonly tasks: CachingTaskList;

Method Details

createTask

Create a caching task which controls the caching of media.

Signature:

createTask(source: SourceDescription, parameters: CachingTaskParameters): CachingTask;

Parameters

Parameter

Type

Description

source

SourceDescription

Describes the media source to be cached.

parameters

CachingTaskParameters

Contains caching task related options.

github
Make sure to follow us on GitHub!
THEO-logo-white
twitter
facebook
linkedin
Copyright © 2020. All Rights Reserved.
Leuven
New York
San Francisco
Singapore
Barcelona