Metacache add abs entry limit (#11483)

Add an absolute limit to the number of metacaches for a bucket.

Delete excess caches if they haven't been handed out in an hour.
This commit is contained in:
Klaus Post
2021-02-08 11:36:16 -08:00
committed by GitHub
parent 0e3211f4ad
commit 9b10118d34
2 changed files with 25 additions and 0 deletions

View File

@@ -43,6 +43,7 @@ type metacacheManager struct {
}
const metacacheManagerTransientBucket = "**transient**"
const metacacheMaxEntries = 5000
// initManager will start async saving the cache.
func (m *metacacheManager) initManager() {