mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Handle resource changes when the resources is already evicted from cache
Also fix a logical flaw in the cache resizer that made it too aggressive. After this I haven't been able to reproduce #11988, but I need to look closer. Closes #11973 Updates #11988
This commit is contained in:
@@ -99,6 +99,8 @@ type HugoSites struct {
|
||||
|
||||
*fatalErrorHandler
|
||||
*buildCounters
|
||||
// Tracks invocations of the Build method.
|
||||
buildCounter atomic.Uint64
|
||||
}
|
||||
|
||||
// ShouldSkipFileChangeEvent allows skipping filesystem event early before
|
||||
@@ -420,10 +422,9 @@ func (cfg *BuildCfg) shouldRender(p *pageState) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
fastRenderMode := cfg.RecentlyVisited.Len() > 0
|
||||
fastRenderMode := p.s.Conf.FastRenderMode()
|
||||
|
||||
if !fastRenderMode {
|
||||
// Not in fast render mode or first time render.
|
||||
if !fastRenderMode || p.s.h.buildCounter.Load() == 0 {
|
||||
return shouldRender
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user