Skip to main content

Class: Cache

Cache API is a part of the Player SDK used for loading files into cache. Use global enplug.cache object to access these methods.

Example usage of the Cache API
const preloadedBlobUrl = await enplug.cache.getFile('https://someurl.com/somefile.jpg');

Useful commands:

Methods#

getFile#

getFile(url): Promise<string>

Parameters#

NameType
urlstring

Returns#

Promise<string>