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

Method checkKeyExists

cachelib/allocator/nvmcache/tests/NvmTestBase.cpp:56–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54NvmCacheTest::~NvmCacheTest() { util::removePath(cacheDir_); }
55
56bool NvmCacheTest::checkKeyExists(folly::StringPiece key, bool ramOnly) {
57 return ramOnly ? cache_->peek(key) != nullptr : fetch(key, false) != nullptr;
58}
59
60WriteHandle NvmCacheTest::fetch(folly::StringPiece key, bool ramOnly) {
61 auto hdl = ramOnly ? cache_->findFastImpl(key, AccessMode::kRead)

Callers 1

TEST_FFunction · 0.80

Calls 1

peekMethod · 0.45

Tested by

no test coverage detected