mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 12:13:40 +08:00
PERF: Add more constraint on the Cache Storage usage
Only restricting cache per age wasn't enough for instances with lots of multimedia usage and high number of posts. MaxEntries is also more effective on cleanup, and purgeOnQuotaError advertise that Discourse cache can be purged if necessary. https://developers.google.com/web/tools/workbox/guides/storage-quota
This commit is contained in:
parent
dcb0e5f1e5
commit
1922d4bf78
|
@ -17,6 +17,8 @@ workbox.routing.registerRoute(
|
|||
plugins: [
|
||||
new workbox.expiration.Plugin({
|
||||
maxAgeSeconds: 7* 24 * 60 * 60, // 7 days
|
||||
maxEntries: 500,
|
||||
purgeOnQuotaError: true, // safe to automatically delete if exceeding the available storage
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user