temp: disabling some caching for auth issue

This commit is contained in:
Jean-Baptiste Pasquier 2021-07-06 15:55:15 +02:00
parent a546792e39
commit 845836422e
1 changed files with 24 additions and 24 deletions

View File

@ -80,28 +80,28 @@ workbox.routing.registerRoute(
}),
);
workbox.routing.registerRoute(
({
request
}) => request.mode === 'navigate',
new workbox.strategies.NetworkFirst({
cacheName: 'pages',
plugins: [
new workbox.cacheableResponse.CacheableResponsePlugin({
statuses: [200],
}),
],
}),
);
// workbox.routing.registerRoute(
// ({
// request
// }) => request.mode === 'navigate',
// new workbox.strategies.NetworkFirst({
// cacheName: 'pages',
// plugins: [
// new workbox.cacheableResponse.CacheableResponsePlugin({
// statuses: [200],
// }),
// ],
// }),
// );
workbox.routing.registerRoute(() => true,
new workbox.strategies.StaleWhileRevalidate({
cacheName: 'apis',
plugins: [
new workbox.broadcastUpdate.BroadcastUpdatePlugin(),
new workbox.expiration.ExpirationPlugin({
maxAgeSeconds: 60 * 60 * 24 * 30,
}),
],
})
);
// workbox.routing.registerRoute(() => true,
// new workbox.strategies.StaleWhileRevalidate({
// cacheName: 'apis',
// plugins: [
// new workbox.broadcastUpdate.BroadcastUpdatePlugin(),
// new workbox.expiration.ExpirationPlugin({
// maxAgeSeconds: 60 * 60 * 24 * 30,
// }),
// ],
// })
// );