demo/service_worker.js
async function fetchAndCache(cache, request) {
  const response = await fetch(request);
  cache.put(request, response.clone());
  return response;
}
async function fetchAndCache(cache, request) {
  const response = await fetch(request);
  cache.put(request, response.clone());
  return response;
}
async function fetchAndCache ( cache , request ) { const response = await fetch ( request ) ; cache . put ( request , response . clone ( ) ) ; return response ; }
Fetch the resource from the network, then store this new version in the
cache.

@param {!Cache} cache
@param {!Request} request
@return {!Promise.<!Response>}
Fetch the resource from the network then store this new version in the cache .