BRING BACK CACHING
This commit is contained in:
72
sw.js
72
sw.js
@ -6,41 +6,41 @@ if(workbox) {
|
|||||||
self.skipWaiting();
|
self.skipWaiting();
|
||||||
workbox.core.clientsClaim();
|
workbox.core.clientsClaim();
|
||||||
|
|
||||||
// workbox.routing.registerRoute(
|
workbox.routing.registerRoute(
|
||||||
// /\.(?:png|gif|jpg|jpeg|svg|webp|avif|gif)$/,
|
/\.(?:png|gif|jpg|jpeg|svg|webp|avif|gif)$/,
|
||||||
// new workbox.strategies.CacheFirst({
|
new workbox.strategies.CacheFirst({
|
||||||
// cacheName: 'images-cache',
|
cacheName: 'images-cache',
|
||||||
// plugins: [
|
plugins: [
|
||||||
// new workbox.expiration.ExpirationPlugin({
|
new workbox.expiration.ExpirationPlugin({
|
||||||
// maxEntries: 600,
|
maxEntries: 600,
|
||||||
// maxAgeSeconds: 365 * 24 * 60 * 60,
|
maxAgeSeconds: 365 * 24 * 60 * 60,
|
||||||
// }),
|
}),
|
||||||
// ],
|
],
|
||||||
// })
|
})
|
||||||
// );
|
);
|
||||||
// workbox.routing.registerRoute(
|
workbox.routing.registerRoute(
|
||||||
// /.*resources\/(semag|sppa).*/,
|
/.*resources\/(semag|sppa).*/,
|
||||||
// new workbox.strategies.CacheFirst({
|
new workbox.strategies.CacheFirst({
|
||||||
// cacheName: 'resources-cache',
|
cacheName: 'resources-cache',
|
||||||
// plugins: [
|
plugins: [
|
||||||
// new workbox.expiration.ExpirationPlugin({
|
new workbox.expiration.ExpirationPlugin({
|
||||||
// maxEntries: 100,
|
maxEntries: 100,
|
||||||
// maxAgeSeconds: 365 * 24 * 60 * 60,
|
maxAgeSeconds: 365 * 24 * 60 * 60,
|
||||||
// }),
|
}),
|
||||||
// ],
|
],
|
||||||
// })
|
})
|
||||||
// );
|
);
|
||||||
|
|
||||||
// workbox.routing.registerRoute(
|
workbox.routing.registerRoute(
|
||||||
// /.*resources\/(games|apps)\.json$/,
|
/.*resources\/(games|apps)\.json$/,
|
||||||
// new workbox.strategies.StaleWhileRevalidate({
|
new workbox.strategies.StaleWhileRevalidate({
|
||||||
// cacheName: 'json-cache',
|
cacheName: 'json-cache',
|
||||||
// plugins: [
|
plugins: [
|
||||||
// new workbox.expiration.ExpirationPlugin({
|
new workbox.expiration.ExpirationPlugin({
|
||||||
// maxAgeSeconds: 3 * 60 * 60,
|
maxAgeSeconds: 3 * 60 * 60,
|
||||||
// maxEntries: 2,
|
maxEntries: 2,
|
||||||
// }),
|
}),
|
||||||
// ],
|
],
|
||||||
// })
|
})
|
||||||
// );
|
);
|
||||||
};
|
};
|
||||||
Reference in New Issue
Block a user