From ef105f680d9d94d252080ab550bc868d1bb6cef1 Mon Sep 17 00:00:00 2001 From: Spythere Date: Sun, 29 Mar 2026 14:09:12 +0200 Subject: [PATCH] hotfix(config): changed caching strategy to StaleWhileRevalidate --- vite.config.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index fd7ac35..71e1e71 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -29,10 +29,13 @@ export default defineConfig({ { urlPattern: /^https:\/\/stacjownik.spythere.eu\/api\/(getVehiclesData|getDonators|getSceneries)/i, - handler: 'CacheFirst', + handler: 'StaleWhileRevalidate', options: { cacheName: 'stacjownik-api-cache', - cacheableResponse: { statuses: [0, 200] } + cacheableResponse: { statuses: [0, 200] }, + expiration: { + maxAgeSeconds: 3600 + } } } ]