temp: even less cache
This commit is contained in:
parent
845836422e
commit
df3425551c
@ -30,21 +30,21 @@ workbox.routing.registerRoute(
|
||||
})
|
||||
);
|
||||
|
||||
workbox.routing.registerRoute(
|
||||
({
|
||||
url
|
||||
}) => [
|
||||
'https://cdn.jsdelivr.net',
|
||||
'https://unpkg.com',
|
||||
'https://cdn.skypack.dev',
|
||||
'https://jspm.dev',
|
||||
'https://fonts.googleapis.com',
|
||||
'https://cdn.startinblox.com'
|
||||
].includes(url.origin) || /cdn/.test(url.origin),
|
||||
new workbox.strategies.StaleWhileRevalidate({
|
||||
cacheName: 'cdn',
|
||||
})
|
||||
);
|
||||
// workbox.routing.registerRoute(
|
||||
// ({
|
||||
// url
|
||||
// }) => [
|
||||
// 'https://cdn.jsdelivr.net',
|
||||
// 'https://unpkg.com',
|
||||
// 'https://cdn.skypack.dev',
|
||||
// 'https://jspm.dev',
|
||||
// 'https://fonts.googleapis.com',
|
||||
// 'https://cdn.startinblox.com'
|
||||
// ].includes(url.origin) || /cdn/.test(url.origin),
|
||||
// new workbox.strategies.StaleWhileRevalidate({
|
||||
// cacheName: 'cdn',
|
||||
// })
|
||||
// );
|
||||
|
||||
workbox.routing.registerRoute(
|
||||
({
|
||||
@ -64,21 +64,21 @@ workbox.routing.registerRoute(
|
||||
}),
|
||||
);
|
||||
|
||||
workbox.routing.registerRoute(
|
||||
({
|
||||
request
|
||||
}) =>
|
||||
request.destination === 'style' ||
|
||||
request.destination === 'script',
|
||||
new workbox.strategies.StaleWhileRevalidate({
|
||||
cacheName: 'assets',
|
||||
plugins: [
|
||||
new workbox.cacheableResponse.CacheableResponsePlugin({
|
||||
statuses: [200],
|
||||
}),
|
||||
],
|
||||
}),
|
||||
);
|
||||
// workbox.routing.registerRoute(
|
||||
// ({
|
||||
// request
|
||||
// }) =>
|
||||
// request.destination === 'style' ||
|
||||
// request.destination === 'script',
|
||||
// new workbox.strategies.StaleWhileRevalidate({
|
||||
// cacheName: 'assets',
|
||||
// plugins: [
|
||||
// new workbox.cacheableResponse.CacheableResponsePlugin({
|
||||
// statuses: [200],
|
||||
// }),
|
||||
// ],
|
||||
// }),
|
||||
// );
|
||||
|
||||
// workbox.routing.registerRoute(
|
||||
// ({
|
||||
|
Loading…
Reference in New Issue
Block a user