MCPcopy
hub / github.com/kubernetes/client-go / mutationCache

Struct mutationCache

tools/cache/mutation_cache.go:76–85  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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
76type 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.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected