From 2c07f831c7b58246b5182f7aafb9813187005a9e Mon Sep 17 00:00:00 2001 From: Dmitrii Stepanov Date: Thu, 6 Apr 2023 16:24:43 +0300 Subject: [PATCH] [#223] node: Refactor cache usage Drop excess type args. Signed-off-by: Dmitrii Stepanov --- cmd/frostfs-node/cache.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/frostfs-node/cache.go b/cmd/frostfs-node/cache.go index eda691496b..3d4fc73752 100644 --- a/cmd/frostfs-node/cache.go +++ b/cmd/frostfs-node/cache.go @@ -130,7 +130,7 @@ type ttlContainerStorage struct { func newCachedContainerStorage(v container.Source, ttl time.Duration) ttlContainerStorage { const containerCacheSize = 100 - lruCnrCache := newNetworkTTLCache[cid.ID, *container.Container](containerCacheSize, ttl, func(id cid.ID) (*container.Container, error) { + lruCnrCache := newNetworkTTLCache(containerCacheSize, ttl, func(id cid.ID) (*container.Container, error) { return v.Get(id) }) @@ -340,7 +340,7 @@ func newCachedIRFetcher(f interface{ InnerRingKeys() ([][]byte, error) }) cached irFetcherCacheTTL = 30 * time.Second ) - irFetcherCache := newNetworkTTLCache[struct{}, [][]byte](irFetcherCacheSize, irFetcherCacheTTL, + irFetcherCache := newNetworkTTLCache(irFetcherCacheSize, irFetcherCacheTTL, func(_ struct{}) ([][]byte, error) { return f.InnerRingKeys() },