smaller avatar cache, exclude gifs from img cache
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
8c8a7c7e88
commit
d3c9fef9af
@ -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: [
|
||||
|
Loading…
Reference in New Issue
Block a user