Refactorings #223

Merged
fyrchik merged 1 commit from dstepanov-yadro/frostfs-node:refactoring/object-3060-remain into master 2023-07-26 21:07:57 +00:00
Showing only changes of commit 2c07f831c7 - Show all commits

View file

@ -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()
},