rework reaktywności danych z API i WS

This commit is contained in:
2023-10-30 23:19:17 +01:00
parent 12ece46089
commit 8de03b9210
24 changed files with 501 additions and 446 deletions
+27 -17
View File
@@ -4,7 +4,7 @@ import { VitePWA } from 'vite-plugin-pwa';
export default defineConfig({
server: {
port: 5001,
port: 5001
},
plugins: [
vue(),
@@ -20,13 +20,25 @@ export default defineConfig({
options: {
cacheName: 'sceneries-cache',
expiration: {
maxEntries: 1,
maxAgeSeconds: 60 * 60 * 24 * 7, // <== 7 days
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
},
cacheableResponse: {
statuses: [0, 200],
statuses: [0, 200]
}
}
},
{
urlPattern: new RegExp('^https://raw.githubusercontent.com/Spythere/api/*', 'i'),
handler: 'NetworkFirst',
options: {
cacheName: 'github-api-cache',
expiration: {
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
},
},
cacheableResponse: {
statuses: [0, 200]
}
}
},
{
urlPattern: /^https:\/\/rj.td2.info.pl\/dist\/img\/thumbnails\/.*/i,
@@ -35,21 +47,19 @@ export default defineConfig({
cacheName: 'images-cache',
expiration: {
maxEntries: 100,
maxAgeSeconds: 60 * 60 * 24 * 60,
maxAgeSeconds: 60 * 60 * 24 * 7 // <== 7 days
},
cacheableResponse: {
statuses: [0, 200, 404],
},
},
},
],
statuses: [0, 200, 404]
}
}
}
]
},
devOptions: {
enabled: true,
},
}),
],
suppressWarnings: true
}
})
]
});