From 01d87af29a4e083406476bd3cb4fcb516c11668f Mon Sep 17 00:00:00 2001 From: Anirudh Oppiliappan Date: Fri, 7 Mar 2025 18:42:55 +0200 Subject: [PATCH] knotserver/git: set ttl for ristretto cache --- knotserver/git/git.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/knotserver/git/git.go b/knotserver/git/git.go index 8a9367a1..f165a0b9 100644 --- a/knotserver/git/git.go +++ b/knotserver/git/git.go @@ -26,9 +26,10 @@ var ( func init() { cache, _ := ristretto.NewCache(&ristretto.Config{ - NumCounters: 1e7, - MaxCost: 1 << 30, - BufferItems: 64, + NumCounters: 1e7, + MaxCost: 1 << 30, + BufferItems: 64, + TtlTickerDurationInSec: 120, }) commitCache = cache } -- knotmirror 0.0.1