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

Method remove

cachelib/interface/components/RAMCacheComponent.cpp:395–404  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

393}
394
395folly::coro::Task<Result<bool>> RAMCacheComponent::remove(Key key) {
396 // calls_, hits_, and misses_ are not tracked here; CacheAllocator already
397 // tracks them via stats_.numCacheRemoves and stats_.numCacheRemoveRamHits.
398 // See getStats().
399 auto latencyGuard = stats_->removeByKey_.latency_.start();
400
401 bool removed = cache_->remove(key) == LruAllocator::RemoveRes::kSuccess;
402 stats_->removeByKey_.throughput_.successes_.inc();
403 co_return removed;
404}
405
406folly::coro::Task<UnitResult> RAMCacheComponent::remove(ReadHandle&& handle) {
407 stats_->removeByHandle_.throughput_.calls_.inc();

Callers 2

CO_TYPED_TESTFunction · 0.45
TYPED_TESTFunction · 0.45

Calls 5

getImplItemFromHandleFunction · 0.85
whatMethod · 0.80
startMethod · 0.45
incMethod · 0.45
acquireMethod · 0.45

Tested by 2

CO_TYPED_TESTFunction · 0.36
TYPED_TESTFunction · 0.36