update sw.js

This commit is contained in:
Nofated095 2024-01-01 12:16:21 +08:00
parent 721ba2bf99
commit 86f3d83d2c
1 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ const { CacheFirst, NetworkFirst, NetworkOnly, StaleWhileRevalidate } = strategi
const { ExpirationPlugin } = expiration; const { ExpirationPlugin } = expiration;
const { CacheableResponsePlugin } = cacheableResponse; const { CacheableResponsePlugin } = cacheableResponse;
const cacheSuffixVersion = '-231130a', const cacheSuffixVersion = '-240101a',
// precacheCacheName = core.cacheNames.precache, // precacheCacheName = core.cacheNames.precache,
// runtimeCacheName = core.cacheNames.runtime, // runtimeCacheName = core.cacheNames.runtime,
maxEntries = 100; maxEntries = 100;
@ -37,7 +37,7 @@ core.clientsClaim();
precaching.cleanupOutdatedCaches(); precaching.cleanupOutdatedCaches();
routing.registerRoute( routing.registerRoute(
/.*xgjalbum\.oss-cn-hangzhou\.aliyuncs\.com/, /.*cfdn\.nofated\.win/,
new CacheFirst({ new CacheFirst({
cacheName: 'static-immutable' + cacheSuffixVersion, cacheName: 'static-immutable' + cacheSuffixVersion,
fetchOptions: { fetchOptions: {