in workbox-v4.3.1/workbox-strategies.dev.js [424:450]
constructor(options = {}) {
this._cacheName = cacheNames_mjs.cacheNames.getRuntimeName(options.cacheName);
if (options.plugins) {
let isUsingCacheWillUpdate = options.plugins.some(plugin => !!plugin.cacheWillUpdate);
this._plugins = isUsingCacheWillUpdate ? options.plugins : [cacheOkAndOpaquePlugin, ...options.plugins];
} else {
// No plugins passed in, use the default plugin.
this._plugins = [cacheOkAndOpaquePlugin];
}
this._networkTimeoutSeconds = options.networkTimeoutSeconds;
{
if (this._networkTimeoutSeconds) {
assert_mjs.assert.isType(this._networkTimeoutSeconds, 'number', {
moduleName: 'workbox-strategies',
className: 'NetworkFirst',
funcName: 'constructor',
paramName: 'networkTimeoutSeconds'
});
}
}
this._fetchOptions = options.fetchOptions || null;
this._matchOptions = options.matchOptions || null;
}