Fix workbox cache matching and expiration

This commit is contained in:
schroda
2026-04-27 17:28:37 +02:00
parent 9440326b72
commit f36a204ed7
2 changed files with 25 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
### Fixed
- (**General**) Fix saving large client data on the server (e.g., custom source filters)
- (**General**) Fix clearing service worker image caches
- (**Library**) Fix total library size chip color in light mode
- (**Browse**) Fix missing pinned sources in the source language filter
- (**Browse**) Fix incorrectly showing "local source" source in the source language filter (the local source can't be disabled)

View File

@@ -73,10 +73,16 @@ export default defineConfig(({ command }) => ({
maxAgeSeconds: d(1).days.inWholeSeconds,
maxEntries: 2500,
purgeOnQuotaError: true,
matchOptions: {
ignoreVary: true,
},
},
cacheableResponse: {
statuses: [0, 200],
},
matchOptions: {
ignoreVary: true,
},
},
},
{
@@ -93,10 +99,16 @@ export default defineConfig(({ command }) => ({
maxAgeSeconds: d(1).days.inWholeSeconds,
maxEntries: 5000,
purgeOnQuotaError: true,
matchOptions: {
ignoreVary: true,
},
},
cacheableResponse: {
statuses: [0, 200],
},
matchOptions: {
ignoreVary: true,
},
},
},
{
@@ -113,10 +125,16 @@ export default defineConfig(({ command }) => ({
maxAgeSeconds: d(365).days.inWholeSeconds,
maxEntries: 300,
purgeOnQuotaError: true,
matchOptions: {
ignoreVary: true,
},
},
cacheableResponse: {
statuses: [0, 200],
},
matchOptions: {
ignoreVary: true,
},
},
},
{
@@ -129,10 +147,16 @@ export default defineConfig(({ command }) => ({
maxAgeSeconds: d(4).days.inWholeSeconds,
maxEntries: 500,
purgeOnQuotaError: true,
matchOptions: {
ignoreVary: true,
},
},
cacheableResponse: {
statuses: [0, 200],
},
matchOptions: {
ignoreVary: true,
},
},
},
],