From 8078af3424e418275c50efab42c26dba1d741811 Mon Sep 17 00:00:00 2001 From: Evgenii Stratonikov Date: Tue, 27 Dec 2022 11:16:31 +0300 Subject: [PATCH] [#2176] neofs-node: Do not invalidate old cache items Signed-off-by: Evgenii Stratonikov --- cmd/frostfs-node/cache.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cmd/frostfs-node/cache.go b/cmd/frostfs-node/cache.go index 713eaf02..b0deca1c 100644 --- a/cmd/frostfs-node/cache.go +++ b/cmd/frostfs-node/cache.go @@ -294,6 +294,10 @@ func (s *ttlContainerLister) update(owner user.ID, cnr cid.ID, add bool) { return } + if s.ttl <= time.Since(val.t) { + return + } + item := val.v item.mtx.Lock()