mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-11 20:03:58 +02:00
Make the cache eviction logic for stale entities more robust
Fixes #12458
This commit is contained in:
@@ -657,8 +657,9 @@ type resourceAdapterInner struct {
|
||||
*publishOnce
|
||||
}
|
||||
|
||||
func (r *resourceAdapterInner) IsStale() bool {
|
||||
return r.Staler.IsStale() || r.target.IsStale()
|
||||
func (r *resourceAdapterInner) StaleVersion() uint32 {
|
||||
// Both of these are incremented on change.
|
||||
return r.Staler.StaleVersion() + r.target.StaleVersion()
|
||||
}
|
||||
|
||||
type resourceTransformations struct {
|
||||
|
Reference in New Issue
Block a user