mirror of
https://github.com/Spythere/stacjownik.git
synced 2026-05-03 05:18:11 +00:00
hotfix(config): changed caching strategy to StaleWhileRevalidate
This commit is contained in:
+5
-2
@@ -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
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user