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 + } } } ]