FIX: Update workbox class references following version bump (#22108)

Followup to cc2f18121d
This commit is contained in:
David Taylor 2023-06-14 14:39:04 +01:00 committed by GitHub
parent 5a035e2f5d
commit a49b45dc14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -41,10 +41,10 @@ workbox.routing.registerRoute(
new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request fails
cacheName: discourseCacheName,
plugins: [
new workbox.cacheableResponse.Plugin({
new workbox.cacheableResponse.CacheableResponsePlugin({
statuses: [200] // opaque responses will return status code '0'
}), // for s3 secure uploads signed urls
new workbox.expiration.Plugin({
new workbox.expiration.ExpirationPlugin({
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
maxEntries: 250,
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
@ -93,10 +93,10 @@ if (cdnUrls.length > 0) {
credentials: 'omit'
},
plugins: [
new workbox.cacheableResponse.Plugin({
new workbox.cacheableResponse.CacheableResponsePlugin({
statuses: [200] // opaque responses will return status code '0'
}),
new workbox.expiration.Plugin({
new workbox.expiration.ExpirationPlugin({
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
maxEntries: 250,
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
@ -124,10 +124,10 @@ workbox.routing.registerRoute(
new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request fails
cacheName: externalCacheName,
plugins: [
new workbox.cacheableResponse.Plugin({
new workbox.cacheableResponse.CacheableResponsePlugin({
statuses: [200] // opaque responses will return status code '0'
}),
new workbox.expiration.Plugin({
new workbox.expiration.ExpirationPlugin({
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
maxEntries: 250,
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage