in workbox-v4.3.1/workbox-strategies.dev.js [304:349]
async makeRequest({
event,
request
}) {
if (typeof request === 'string') {
request = new Request(request);
}
{
assert_mjs.assert.isInstance(request, Request, {
moduleName: 'workbox-strategies',
className: 'CacheOnly',
funcName: 'makeRequest',
paramName: 'request'
});
}
const response = await cacheWrapper_mjs.cacheWrapper.match({
cacheName: this._cacheName,
request,
event,
matchOptions: this._matchOptions,
plugins: this._plugins
});
{
logger_mjs.logger.groupCollapsed(messages.strategyStart('CacheOnly', request));
if (response) {
logger_mjs.logger.log(`Found a cached response in the '${this._cacheName}'` + ` cache.`);
messages.printFinalResponse(response);
} else {
logger_mjs.logger.log(`No response found in the '${this._cacheName}' cache.`);
}
logger_mjs.logger.groupEnd();
}
if (!response) {
throw new WorkboxError_mjs.WorkboxError('no-response', {
url: request.url
});
}
return response;
}