Skip to content

Commit 11c010a

Browse files
authored
perf(web-ui): improve service worker s3 regexp (#883)
1 parent 2389714 commit 11c010a

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

services/web-ui/src/serviceWorker.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ importScripts(
1515
workbox.routing.registerRoute(
1616
/\.(css|html|js)$/,
1717
new workbox.strategies.NetworkFirst({
18-
cacheName: "assets-cache",
18+
cacheName: "assets",
1919
plugins: [
2020
new workbox.expiration.ExpirationPlugin({
21-
maxEntries: 50, // Limit number of images cached
21+
maxEntries: 50,
2222
maxAgeSeconds: 1 * 24 * 60 * 60, // 1 day
2323
}),
2424
],
@@ -27,12 +27,12 @@ workbox.routing.registerRoute(
2727

2828
// Images
2929
workbox.routing.registerRoute(
30-
/https?:\/\/s3\./,
30+
/https?:\/\/s3\.app\.meetly\.site/,
3131
new workbox.strategies.CacheFirst({
32-
cacheName: "images-cache",
32+
cacheName: "images",
3333
plugins: [
3434
new workbox.expiration.ExpirationPlugin({
35-
maxEntries: 50, // Limit number of images cached
35+
maxEntries: 50,
3636
maxAgeSeconds: 30 * 24 * 60 * 60, // 30 days
3737
}),
3838
],

0 commit comments

Comments
 (0)