mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 03:54:59 +08:00
FIX: Update workbox class references following version bump (#22108)
Followup to cc2f18121d
This commit is contained in:
parent
5a035e2f5d
commit
a49b45dc14
|
@ -41,10 +41,10 @@ workbox.routing.registerRoute(
|
||||||
new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request fails
|
new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request fails
|
||||||
cacheName: discourseCacheName,
|
cacheName: discourseCacheName,
|
||||||
plugins: [
|
plugins: [
|
||||||
new workbox.cacheableResponse.Plugin({
|
new workbox.cacheableResponse.CacheableResponsePlugin({
|
||||||
statuses: [200] // opaque responses will return status code '0'
|
statuses: [200] // opaque responses will return status code '0'
|
||||||
}), // for s3 secure uploads signed urls
|
}), // for s3 secure uploads signed urls
|
||||||
new workbox.expiration.Plugin({
|
new workbox.expiration.ExpirationPlugin({
|
||||||
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
||||||
maxEntries: 250,
|
maxEntries: 250,
|
||||||
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
|
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
|
||||||
|
@ -93,10 +93,10 @@ if (cdnUrls.length > 0) {
|
||||||
credentials: 'omit'
|
credentials: 'omit'
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
new workbox.cacheableResponse.Plugin({
|
new workbox.cacheableResponse.CacheableResponsePlugin({
|
||||||
statuses: [200] // opaque responses will return status code '0'
|
statuses: [200] // opaque responses will return status code '0'
|
||||||
}),
|
}),
|
||||||
new workbox.expiration.Plugin({
|
new workbox.expiration.ExpirationPlugin({
|
||||||
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
||||||
maxEntries: 250,
|
maxEntries: 250,
|
||||||
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
|
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
|
new workbox.strategies.NetworkFirst({ // This will only use the cache when a network request fails
|
||||||
cacheName: externalCacheName,
|
cacheName: externalCacheName,
|
||||||
plugins: [
|
plugins: [
|
||||||
new workbox.cacheableResponse.Plugin({
|
new workbox.cacheableResponse.CacheableResponsePlugin({
|
||||||
statuses: [200] // opaque responses will return status code '0'
|
statuses: [200] // opaque responses will return status code '0'
|
||||||
}),
|
}),
|
||||||
new workbox.expiration.Plugin({
|
new workbox.expiration.ExpirationPlugin({
|
||||||
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
||||||
maxEntries: 250,
|
maxEntries: 250,
|
||||||
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
|
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
|
||||||
|
|
Loading…
Reference in New Issue
Block a user