diff --git a/vite.config.ts b/vite.config.ts index 6989713..1c9c4bf 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -36,6 +36,20 @@ export default defineConfig({ }, }, }, + { + urlPattern: /^https:\/\/static.spythere.eu\/.*/i, + handler: 'CacheFirst', + options: { + cacheName: 'spythere-api-images-cache', + expiration: { + maxEntries: 100, + maxAgeSeconds: 60 * 60 * 24, // <== 1 day + }, + cacheableResponse: { + statuses: [200, 302], + }, + }, + }, ], }, }),