hotfix(config): changed caching strategy to StaleWhileRevalidate

This commit is contained in:
2026-03-29 14:09:12 +02:00
parent 9337cb011c
commit ef105f680d
+5 -2
View File
@@ -29,10 +29,13 @@ export default defineConfig({
{ {
urlPattern: urlPattern:
/^https:\/\/stacjownik.spythere.eu\/api\/(getVehiclesData|getDonators|getSceneries)/i, /^https:\/\/stacjownik.spythere.eu\/api\/(getVehiclesData|getDonators|getSceneries)/i,
handler: 'CacheFirst', handler: 'StaleWhileRevalidate',
options: { options: {
cacheName: 'stacjownik-api-cache', cacheName: 'stacjownik-api-cache',
cacheableResponse: { statuses: [0, 200] } cacheableResponse: { statuses: [0, 200] },
expiration: {
maxAgeSeconds: 3600
}
} }
} }
] ]