diff --git a/packages/app/src/service-worker.ts b/packages/app/src/service-worker.ts index 264a1644..14d3d5c6 100644 --- a/packages/app/src/service-worker.ts +++ b/packages/app/src/service-worker.ts @@ -55,7 +55,7 @@ registerRoute( cacheName: "avatar-cache", plugins: [ new ExpirationPlugin({ - maxEntries: 1000, + maxEntries: 200, // gif avatars can still be large matchOptions: { ignoreVary: true, }, @@ -69,8 +69,8 @@ registerRoute( // Cache images from any domain registerRoute( - // Match any image request regardless of the origin - ({ request }) => request.destination === "image", + // match images except gif + ({ request, url }) => request.destination === "image" && !url.pathname.endsWith(".gif"), new CacheFirst({ cacheName: "image-cache", plugins: [