mirror of https://github.com/Nofated095/blog
update sw.js
This commit is contained in:
parent
721ba2bf99
commit
86f3d83d2c
|
@ -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: {
|
||||||
|
|
Loading…
Reference in New Issue