Skip to content

Commit 03b88c6

Browse files
committed
cache/dynacache: Reset ticker in case one cache eviction takes some time
Updates gohugoio#12129
1 parent 7ee0f70 commit 03b88c6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

cache/dynacache/dynacache.go

+2
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,8 @@ func (c *Cache) start() func() {
295295
select {
296296
case <-ticker.C:
297297
c.adjustCurrentMaxSize()
298+
// Reset the ticker to avoid drift.
299+
ticker.Reset(c.opts.CheckInterval)
298300
case <-quit:
299301
ticker.Stop()
300302
return

0 commit comments

Comments
 (0)