mirror of
https://github.com/gohugoio/hugo.git
synced 2024-05-11 05:54:58 +00:00
cache/dynacache: Reset ticker in case one cache eviction takes some time
Updates #12129
This commit is contained in:
2
cache/dynacache/dynacache.go
vendored
2
cache/dynacache/dynacache.go
vendored
@ -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
|
||||
|
Reference in New Issue
Block a user