mirror of
https://github.com/niusmallnan/steve.git
synced 2025-09-03 06:05:41 +00:00
Always calculate state from current object, not cached object
This commit is contained in:
@@ -92,12 +92,7 @@ func (s *SummaryCache) SummaryAndRelationship(obj runtime.Object) (*summary.Summ
|
|||||||
defer s.RUnlock()
|
defer s.RUnlock()
|
||||||
|
|
||||||
key := toKey(obj)
|
key := toKey(obj)
|
||||||
summaryObj, ok := s.cache.Get(key)
|
summarized := summary.Summarized(obj)
|
||||||
if !ok {
|
|
||||||
return summary.Summarized(obj), nil
|
|
||||||
}
|
|
||||||
|
|
||||||
summarized := summaryObj.(*summary.SummarizedObject)
|
|
||||||
|
|
||||||
relObjs, err := s.cache.ByIndex(relationshipIndex, key)
|
relObjs, err := s.cache.ByIndex(relationshipIndex, key)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Reference in New Issue
Block a user