mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-17 21:01:26 +02:00
Make the cache eviction logic for stale entities more robust
Fixes #12458
This commit is contained in:
@@ -95,8 +95,8 @@ func (ns *Namespace) Unmarshal(args ...any) (any, error) {
|
||||
|
||||
return &resources.StaleValue[any]{
|
||||
Value: v,
|
||||
IsStaleFunc: func() bool {
|
||||
return resource.IsStaleAny(r)
|
||||
StaleVersionFunc: func() uint32 {
|
||||
return resource.StaleVersion(r)
|
||||
},
|
||||
}, nil
|
||||
})
|
||||
@@ -132,8 +132,8 @@ func (ns *Namespace) Unmarshal(args ...any) (any, error) {
|
||||
|
||||
return &resources.StaleValue[any]{
|
||||
Value: v,
|
||||
IsStaleFunc: func() bool {
|
||||
return false
|
||||
StaleVersionFunc: func() uint32 {
|
||||
return 0
|
||||
},
|
||||
}, nil
|
||||
})
|
||||
|
Reference in New Issue
Block a user