mirror of
https://github.com/distribution/distribution.git
synced 2025-09-26 06:40:12 +00:00
registry/storage/cache/memory: Use LRU cache to bound cache size
Instead of letting the cache grow without bound, use a LRU to impose a size limit. The limit is configurable through a new `blobdescriptorsize` config key. Signed-off-by: Aaron Lehmann <alehmann@netflix.com>
This commit is contained in:
2
registry/storage/cache/memory/memory_test.go
vendored
2
registry/storage/cache/memory/memory_test.go
vendored
@@ -9,5 +9,5 @@ import (
|
||||
// TestInMemoryBlobInfoCache checks the in memory implementation is working
|
||||
// correctly.
|
||||
func TestInMemoryBlobInfoCache(t *testing.T) {
|
||||
cachecheck.CheckBlobDescriptorCache(t, NewInMemoryBlobDescriptorCacheProvider())
|
||||
cachecheck.CheckBlobDescriptorCache(t, NewInMemoryBlobDescriptorCacheProvider(UnlimitedSize))
|
||||
}
|
||||
|
Reference in New Issue
Block a user