cache-size
v1.0.3
Published
Get a Cache's size, useful when working with Service Workers
Downloads
2
Readme
cache-size
Get a Cache's size in bytes, useful when working with Service Workers.
* Take into account that responses of type opaque
will report a size of 0, more information here, here and here.
Install
$ npm install cache-size
Usage
import cacheSize from 'cache-size';
cacheSize('static-assets');
//=> 12327273 the space used by the entire cache in bytes
API
cacheSize(cachename)
cachename
Type: string
The name of the cache whose size you want to know.