Unverified Commit 234d8fac authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tools] switch cache mode to reload (#62076)

parent 210f7680
......@@ -413,8 +413,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
// Provide a no-cache param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
// Provide a 'reload' param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'reload'})));
})
);
});
......@@ -497,7 +497,7 @@ self.addEventListener("fetch", (event) => {
// Either respond with the cached resource, or perform a fetch and
// lazily populate the cache. Ensure the resources are not cached
// by the browser for longer than the service worker expects.
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
var modifiedRequest = new Request(event.request, {'cache': 'reload'});
return response || fetch(modifiedRequest).then((response) => {
cache.put(event.request, response.clone());
return response;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment