[flutter_tools] add cache busting query param (#63818)
This commit is contained in:
parent
9e0ad9b6b5
commit
262c48d2ea
@ -413,8 +413,8 @@ const CORE = [
|
|||||||
self.addEventListener("install", (event) => {
|
self.addEventListener("install", (event) => {
|
||||||
return event.waitUntil(
|
return event.waitUntil(
|
||||||
caches.open(TEMP).then((cache) => {
|
caches.open(TEMP).then((cache) => {
|
||||||
// Provide a 'reload' param to ensure the latest version is downloaded.
|
return cache.addAll(
|
||||||
return cache.addAll(CORE.map((value) => new Request(value, {'cache': 'reload'})));
|
CORE.map((value) => new Request(value + '?revision=' + RESOURCES[value], {'cache': 'reload'})));
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user