From 5ea2daf6e4130e25a4acf8d5b02e2f888315fd07 Mon Sep 17 00:00:00 2001 From: yell0wsuit <5692900+yell0wsuit@users.noreply.github.com> Date: Sun, 22 Dec 2024 12:51:58 +0700 Subject: [PATCH] [Web] Set cache timer --- vite.config.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.js b/vite.config.js index a089b917e..b563c6449 100644 --- a/vite.config.js +++ b/vite.config.js @@ -102,13 +102,13 @@ export default defineConfig(({ mode }) => { workbox: { runtimeCaching: [ { - urlPattern: /\.(?:js|css|json|png|jpg|jpeg|svg|ico|woff2)$/, // Cache everything except audio + urlPattern: /\.(?:js|css|json|png|jpg|jpeg|svg|ico|woff2)$/, handler: "CacheFirst", options: { cacheName: "app-dynamic-cache", expiration: { maxEntries: 100, - //maxAgeSeconds: 7 * 24 * 60 * 60, // Cache for 1 week + maxAgeSeconds: 7 * 24 * 60 * 60, // Cache for 1 week }, }, },