Fix workbox cache matching and expiration
This commit is contained in:
@@ -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,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user