From d8c08a7f60c086ff0ead42dcf13ec30b29cef761 Mon Sep 17 00:00:00 2001 From: Ben Grant Date: Fri, 19 Aug 2022 18:10:50 +1000 Subject: [PATCH] Hotfix: SW clean outdated caches --- crabfit-frontend/public/sw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crabfit-frontend/public/sw.js b/crabfit-frontend/public/sw.js index aab6b66..afbc900 100644 --- a/crabfit-frontend/public/sw.js +++ b/crabfit-frontend/public/sw.js @@ -2,12 +2,13 @@ import { clientsClaim, skipWaiting } from 'workbox-core' import { ExpirationPlugin } from 'workbox-expiration' -import { precacheAndRoute, createHandlerBoundToURL } from 'workbox-precaching' +import { precacheAndRoute, createHandlerBoundToURL, cleanupOutdatedCaches } from 'workbox-precaching' import { registerRoute } from 'workbox-routing' import { StaleWhileRevalidate, NetworkFirst } from 'workbox-strategies' skipWaiting() clientsClaim() +cleanupOutdatedCaches() // Injection point precacheAndRoute(self.__WB_MANIFEST)