Make the cache eviction logic for stale entities more robust

Fixes #12458
This commit is contained in:
Bjørn Erik Pedersen
2024-05-03 11:04:57 +02:00
parent 68e95327f7
commit 503d20954f
12 changed files with 157 additions and 55 deletions

View File

@@ -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
})