sw fix
This commit is contained in:
@ -31,12 +31,20 @@ registerRoute(
|
||||
cacheName: "image-cache",
|
||||
plugins: [
|
||||
new ExpirationPlugin({
|
||||
maxEntries: 100,
|
||||
maxEntries: 200,
|
||||
}),
|
||||
],
|
||||
}),
|
||||
);
|
||||
|
||||
registerRoute(
|
||||
({ url }) => url.pathname.endsWith("api/v1/preview"),
|
||||
new StaleWhileRevalidate({
|
||||
cacheName: "preview-cache",
|
||||
plugins: [new ExpirationPlugin({ maxAgeSeconds: 4 * 60 * 60 })],
|
||||
}),
|
||||
);
|
||||
|
||||
self.addEventListener("message", event => {
|
||||
if (event.data && event.data.type === "SKIP_WAITING") {
|
||||
self.skipWaiting();
|
||||
|
Reference in New Issue
Block a user