Clean the caches properly to avoid memleak

This commit is contained in:
2025-02-19 11:55:32 +00:00
parent 3ad8fb4518
commit 803a1e5e21
4 changed files with 32 additions and 2 deletions
+3 -2
View File
@@ -714,8 +714,9 @@ func (t *TraefikOidc) startTokenCleanup() {
defer ticker.Stop()
for range ticker.C {
t.logger.Debug("Starting token cleanup cycle")
t.tokenCache.Cleanup()
t.tokenBlacklist.Cleanup()
t.tokenCache.Cleanup()
t.tokenBlacklist.Cleanup()
t.jwkCache.Cleanup() // Assuming jwkCache is the cache from cache.go
// Removed runtime.GC() call
}
}()