mirror of https://github.com/Nofated095/blog
update sw.js
This commit is contained in:
parent
50a488b042
commit
8b3619214b
|
@ -53,6 +53,23 @@ routing.registerRoute(
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
routing.registerRoute(
|
||||||
|
/.*blog\.nofated\.win/,
|
||||||
|
new CacheFirst({
|
||||||
|
cacheName: 'static-immutable' + cacheSuffixVersion,
|
||||||
|
fetchOptions: {
|
||||||
|
mode: 'cors',
|
||||||
|
credentials: 'omit'
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new ExpirationPlugin({
|
||||||
|
maxAgeSeconds: 30 * 24 * 60 * 60,
|
||||||
|
purgeOnQuotaError: true
|
||||||
|
})
|
||||||
|
]
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
routing.registerRoute(
|
routing.registerRoute(
|
||||||
/.*xgjalbum\.oss-cn-hangzhou\.aliyuncs\.com/,
|
/.*xgjalbum\.oss-cn-hangzhou\.aliyuncs\.com/,
|
||||||
new CacheFirst({
|
new CacheFirst({
|
||||||
|
|
Loading…
Reference in New Issue