Home > hls.js > Loader > getCacheAge

Loader.getCacheAge property

getCacheAge() is called by hls.js to get the duration that a given object has been sitting in a cache proxy when playing live. If implemented, this should return a value in seconds.

For HTTP based loaders, this should return the contents of the "age" header.

Signature:

getCacheAge?: () => number | null;