| 393 | } |
| 394 | |
| 395 | folly::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 | |
| 406 | folly::coro::Task<UnitResult> RAMCacheComponent::remove(ReadHandle&& handle) { |
| 407 | stats_->removeByHandle_.throughput_.calls_.inc(); |