Skip to content

Commit

Permalink
[Web] Set cache timer
Browse files Browse the repository at this point in the history
  • Loading branch information
yell0wsuit authored Dec 22, 2024
1 parent a4b718a commit 5ea2daf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
},
},
},
Expand Down

0 comments on commit 5ea2daf

Please sign in to comment.