diff options
author | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-05-03 11:04:57 +0200 |
---|---|---|
committer | Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com> | 2024-05-04 19:45:43 +0200 |
commit | 503d20954f10507b9b43c6ee1c38001e53cf0b14 (patch) | |
tree | 06e1aeddd995c2b8ff2fb48c0879187b2b819e4b /tpl | |
parent | 68e95327f7be941c44c256d2dac74ea96e731674 (diff) |
Make the cache eviction logic for stale entities more robust
Fixes #12458
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/transform/unmarshal.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tpl/transform/unmarshal.go b/tpl/transform/unmarshal.go index d876c88d7..dc9029c8d 100644 --- a/tpl/transform/unmarshal.go +++ b/tpl/transform/unmarshal.go @@ -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 }) |