forked from TrueCloudLab/frostfs-node
[#5] services/object_manager: Use generic LRU cache
Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
This commit is contained in:
parent
1b3374ac7f
commit
f0be0befc5
3 changed files with 10 additions and 11 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue