From 4202a55673aa9e860b7eb52d0a21fbc12fb2084c Mon Sep 17 00:00:00 2001 From: Spythere Date: Thu, 16 May 2024 21:36:16 +0200 Subject: [PATCH] chore: updated pwa strategies --- vite.config.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index a8235d0..2452fc7 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,8 +20,8 @@ export default defineConfig({ cleanupOutdatedCaches: true, runtimeCaching: [ { - urlPattern: new RegExp('^https://stacjownik.spythere.eu/api/getSceneries', 'i'), - handler: 'CacheFirst', + urlPattern: /^https:\/\/stacjownik.spythere.eu\/api\/getSceneries/i, + handler: 'StaleWhileRevalidate', options: { cacheName: 'spythere-sceneries-cache', cacheableResponse: { @@ -30,10 +30,10 @@ export default defineConfig({ } }, { - urlPattern: new RegExp('^https://static.spythere.eu/*', 'i'), + urlPattern: /^https:\/\/static.spythere.eu\/.*/i, handler: 'CacheFirst', options: { - cacheName: 'spythere-cache', + cacheName: 'spythere-static-cache', cacheableResponse: { statuses: [0, 200] }