From 445e6f0195914d582463b57c21860721702dcd88 Mon Sep 17 00:00:00 2001 From: peterpeterparker Date: Fri, 3 Dec 2021 09:00:30 +0100 Subject: [PATCH] feat: sw cache ic0 img and data Signed-off-by: peterpeterparker --- studio/src/sw.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/studio/src/sw.js b/studio/src/sw.js index 7618102ce..f4b65ac42 100644 --- a/studio/src/sw.js +++ b/studio/src/sw.js @@ -48,7 +48,7 @@ workbox.routing.registerRoute( // Cache the images workbox.routing.registerRoute( - /^(?!.*(?:unsplash|giphy|tenor|firebasestorage))(?=.*(?:png|jpg|jpeg|svg|webp|gif)).*/, + /^(?!.*(?:unsplash|giphy|tenor|firebasestorage|ic0))(?=.*(?:png|jpg|jpeg|svg|webp|gif)).*/, new workbox.strategies.CacheFirst({ cacheName: 'images', plugins: [ @@ -61,7 +61,7 @@ workbox.routing.registerRoute( ); workbox.routing.registerRoute( - /^(?=.*(?:unsplash|giphy|tenor|firebasestorage))(?=.*(?:png|jpg|jpeg|svg|webp|gif)).*/, + /^(?=.*(?:unsplash|giphy|tenor|firebasestorage|ic0))(?=.*(?:png|jpg|jpeg|svg|webp|gif)).*/, new workbox.strategies.StaleWhileRevalidate({ cacheName: 'cors-images', plugins: [ @@ -78,7 +78,7 @@ workbox.routing.registerRoute( // Cache the data workbox.routing.registerRoute( - /^(?=.*(?:githubusercontent|firebasestorage))(?=.*(?:csv|json)).*/, + /^(?=.*(?:githubusercontent|firebasestorage|ic0))(?=.*(?:csv|json)).*/, new workbox.strategies.StaleWhileRevalidate({ cacheName: 'data-content', plugins: [