[#5] services/object_manager: Use generic LRU cache

Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
Evgenii Stratonikov 2022-12-30 12:54:48 +03:00 committed by fyrchik
parent 1b3374ac7f
commit f0be0befc5
3 changed files with 10 additions and 11 deletions

View file

@ -4,7 +4,7 @@ import (
"fmt"
"github.com/TrueCloudLab/frostfs-node/pkg/util/logger"
lru "github.com/hashicorp/golang-lru"
lru "github.com/hashicorp/golang-lru/v2"
"go.uber.org/zap"
)
@ -48,7 +48,7 @@ func NewChecker(oo ...Option) *ExpirationChecker {
panicOnNil(cfg.tsSource, "Tombstone source")
cache, err := lru.New(cfg.cacheSize)
cache, err := lru.New[string, uint64](cfg.cacheSize)
if err != nil {
panic(fmt.Errorf("could not create LRU cache with %d size: %w", cfg.cacheSize, err))
}