[flutter_tools] add cache busting query param (#63818)

This commit is contained in:
Jonah Williams 2020-08-17 22:41:05 -07:00 committed by GitHub
parent 9e0ad9b6b5
commit 262c48d2ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,8 +413,8 @@ const CORE = [
self.addEventListener("install", (event) => {
return event.waitUntil(
caches.open(TEMP).then((cache) => {
// Provide a 'reload' param to ensure the latest version is downloaded.
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'reload'})));
return cache.addAll(
CORE.map((value) => new Request(value + '?revision=' + RESOURCES[value], {'cache': 'reload'})));
})
);
});