MCPcopy Create free account
hub / github.com/apple/foundationdb / invalidateCache

Method invalidateCache

fdbclient/NativeAPI.actor.cpp:1943–1955  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1941}
1942
1943void DatabaseContext::invalidateCache(const KeyRef& tenantPrefix, const KeyRef& key, Reverse isBackward) {
1944 Arena arena;
1945 KeyRef resolvedKey = key;
1946 if (!tenantPrefix.empty()) {
1947 resolvedKey = resolvedKey.withPrefix(tenantPrefix, arena);
1948 }
1949
1950 if (isBackward) {
1951 locationCache.rangeContainingKeyBefore(resolvedKey)->value() = Reference<LocationInfo>();
1952 } else {
1953 locationCache.rangeContaining(resolvedKey)->value() = Reference<LocationInfo>();
1954 }
1955}
1956
1957void DatabaseContext::invalidateCache(const KeyRef& tenantPrefix, const KeyRangeRef& keys) {
1958 Arena arena;

Calls 10

rangeContainingMethod · 0.80
intersectingRangesMethod · 0.80
KeyRangeRefClass · 0.50
emptyMethod · 0.45
withPrefixMethod · 0.45
valueMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected