Refactorings #223
1 changed files with 2 additions and 2 deletions
|
@ -130,7 +130,7 @@ type ttlContainerStorage struct {
|
||||||
func newCachedContainerStorage(v container.Source, ttl time.Duration) ttlContainerStorage {
|
func newCachedContainerStorage(v container.Source, ttl time.Duration) ttlContainerStorage {
|
||||||
const containerCacheSize = 100
|
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)
|
return v.Get(id)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -340,7 +340,7 @@ func newCachedIRFetcher(f interface{ InnerRingKeys() ([][]byte, error) }) cached
|
||||||
irFetcherCacheTTL = 30 * time.Second
|
irFetcherCacheTTL = 30 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
irFetcherCache := newNetworkTTLCache[struct{}, [][]byte](irFetcherCacheSize, irFetcherCacheTTL,
|
irFetcherCache := newNetworkTTLCache(irFetcherCacheSize, irFetcherCacheTTL,
|
||||||
func(_ struct{}) ([][]byte, error) {
|
func(_ struct{}) ([][]byte, error) {
|
||||||
return f.InnerRingKeys()
|
return f.InnerRingKeys()
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue