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

Method lookup

cachelib/navy/block_cache/BlockCache.cpp:471–483  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

469}
470
471Status BlockCache::lookup(HashedKey hk,
472 Buffer& value,
473 uint32_t& lastAccessTimeSecs) {
474 // return 0 if there is an issue in lookup (e.g. device error)
475 lastAccessTimeSecs = 0;
476 auto ld = lookupInternal(hk);
477 if (ld.status_ == Status::Ok) {
478 value = std::move(ld.buffer_);
479 value.shrink(ld.valueSize_);
480 lastAccessTimeSecs = ld.lastAccessTimeSecs_;
481 }
482 return ld.status_;
483}
484
485folly::Expected<BlockCache::ReadResult, Status> BlockCache::lookup(
486 const IndexEntry& entry) {

Callers 7

lookupInternalMethod · 0.45
CollisionCreatorMethod · 0.45
TESTFunction · 0.45
resetTestRunFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45
TESTFunction · 0.45

Calls 5

shrinkMethod · 0.80
foundMethod · 0.80
addressMethod · 0.80
sizeHintMethod · 0.80
peekMethod · 0.45

Tested by 6

CollisionCreatorMethod · 0.36
TESTFunction · 0.36
resetTestRunFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36
TESTFunction · 0.36