fix: SW cache

This commit is contained in:
2022-12-30 15:45:17 +01:00
parent 279bbfa4db
commit 272c9f50f8
+2 -1
View File
@@ -12,7 +12,7 @@ export default defineConfig({
registerType: 'prompt', registerType: 'prompt',
workbox: { workbox: {
globPatterns: ['**/*.{js,css,html,png,svg,img}'], globPatterns: ['**/*.{js,css,html,png,svg,jpg}'],
runtimeCaching: [ runtimeCaching: [
{ {
urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'), urlPattern: new RegExp('^https://spythere.pl/api/getSceneries', 'i'),
@@ -20,6 +20,7 @@ export default defineConfig({
options: { options: {
cacheName: 'sceneries-cache', cacheName: 'sceneries-cache',
expiration: { expiration: {
maxEntries: 1,
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
}, },
cacheableResponse: { cacheableResponse: {