MCPcopy Create free account
hub / github.com/facebook/CacheLib / couldExist

Method couldExist

cachelib/navy/block_cache/BlockCache.cpp:339–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339bool BlockCache::couldExist(HashedKey hk) {
340 const auto lr = index_->peek(hk.keyHash());
341 if (!lr.found()) {
342 lookupCount_.inc();
343 return false;
344 }
345 return true;
346}
347
348uint64_t BlockCache::estimateWriteSize(HashedKey hk, BufferView value) const {
349 return serializedSize(hk.key().size(), value.size());

Callers 1

TESTFunction · 0.45

Calls 4

foundMethod · 0.80
peekMethod · 0.45
keyHashMethod · 0.45
incMethod · 0.45

Tested by 1

TESTFunction · 0.36