Skip to content
This repository was archived by the owner on Aug 8, 2025. It is now read-only.

Commit 2d4c39d

Browse files
committed
[pwa,sw,workbox]: set cahce duration to a week;
1 parent 7b55f65 commit 2d4c39d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

vite.config.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ import ViteVisualizer from 'rollup-plugin-visualizer';
66
import { VitePWA } from 'vite-plugin-pwa'
77
import { VitePluginRadar } from 'vite-plugin-radar';
88

9-
const maxAgeSeconds = 365 * 24 * 60 * 60; // Cache for 1 year
9+
// const maxAgeSeconds = 365 * 24 * 60 * 60; // Cache for 1 year
10+
const maxAgeSeconds = 7 * 24 * 60 * 60; // cache for 1 week
1011

1112
// https://stackoverflow.com/a/15802301
1213
const headCommitHash = (): string | undefined => {

0 commit comments

Comments
 (0)