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:
enplug.assets.getFile()- loads file into cache
Methods#
getFile#
▸ getFile(url): Promise<string>
Parameters#
| Name | Type |
|---|---|
url | string |
Returns#
Promise<string>