Skip to content

Commit

Permalink
cache/dynacache: Reset ticker in case one cache eviction takes some time
Browse files Browse the repository at this point in the history
Updates #12129
  • Loading branch information
bep committed Feb 23, 2024
1 parent 7ee0f70 commit 03b88c6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions cache/dynacache/dynacache.go
Expand Up @@ -295,6 +295,8 @@ func (c *Cache) start() func() {
select {
case <-ticker.C:
c.adjustCurrentMaxSize()
// Reset the ticker to avoid drift.
ticker.Reset(c.opts.CheckInterval)
case <-quit:
ticker.Stop()
return
Expand Down

0 comments on commit 03b88c6

Please sign in to comment.