Skip to content

Commit 234d8fa

Browse files
author
Jonah Williams
authored
[flutter_tools] switch cache mode to reload (flutter#62076)
1 parent 210f768 commit 234d8fa

File tree

1 file changed

+3
-3
lines changed
  • packages/flutter_tools/lib/src/build_system/targets

1 file changed

+3
-3
lines changed

packages/flutter_tools/lib/src/build_system/targets/web.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -413,8 +413,8 @@ const CORE = [
413413
self.addEventListener("install", (event) => {
414414
return event.waitUntil(
415415
caches.open(TEMP).then((cache) => {
416-
// Provide a no-cache param to ensure the latest version is downloaded.
417-
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'no-cache'})));
416+
// Provide a 'reload' param to ensure the latest version is downloaded.
417+
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'reload'})));
418418
})
419419
);
420420
});
@@ -497,7 +497,7 @@ self.addEventListener("fetch", (event) => {
497497
// Either respond with the cached resource, or perform a fetch and
498498
// lazily populate the cache. Ensure the resources are not cached
499499
// by the browser for longer than the service worker expects.
500-
var modifiedRequest = new Request(event.request, {'cache': 'no-cache'});
500+
var modifiedRequest = new Request(event.request, {'cache': 'reload'});
501501
return response || fetch(modifiedRequest).then((response) => {
502502
cache.put(event.request, response.clone());
503503
return response;

0 commit comments

Comments
 (0)