mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
cache/dynacache: Reset ticker in case one cache eviction takes some time
Updates #12129
This commit is contained in:
parent
7ee0f70507
commit
03b88c6ddb
1 changed files with 2 additions and 0 deletions
2
cache/dynacache/dynacache.go
vendored
2
cache/dynacache/dynacache.go
vendored
|
@ -295,6 +295,8 @@ func (c *Cache) start() func() {
|
||||||
select {
|
select {
|
||||||
case <-ticker.C:
|
case <-ticker.C:
|
||||||
c.adjustCurrentMaxSize()
|
c.adjustCurrentMaxSize()
|
||||||
|
// Reset the ticker to avoid drift.
|
||||||
|
ticker.Reset(c.opts.CheckInterval)
|
||||||
case <-quit:
|
case <-quit:
|
||||||
ticker.Stop()
|
ticker.Stop()
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue