mutationCache doesn't guarantee that it returns values added via Mutation since they can page out and since you can't distinguish between, "didn't observe create" and "was deleted after create", if the key is missing from the backing cache, we always return it as missing
| 74 | // since you can't distinguish between, "didn't observe create" and "was deleted after create", |
| 75 | // if the key is missing from the backing cache, we always return it as missing |
| 76 | type mutationCache struct { |
| 77 | lock sync.Mutex |
| 78 | backingCache Store |
| 79 | indexer Indexer |
| 80 | mutationCache *utilcache.LRUExpireCache |
| 81 | includeAdds bool |
| 82 | ttl time.Duration |
| 83 | |
| 84 | comparator ResourceVersionComparator |
| 85 | } |
| 86 | |
| 87 | // GetByKey is never guaranteed to return back the value set in Mutation. It could be paged out, it could |
| 88 | // be older than another copy, the backingCache may be more recent or, you might have written twice into the same key. |
nothing calls this directly
no outgoing calls
no test coverage detected