| 658 | } |
| 659 | |
| 660 | void FlashCacheComponent::release(CacheItem& item, bool inserted) { |
| 661 | stats_->release_.throughput_.calls_.inc(); |
| 662 | auto latencyGuard = stats_->release_.latency_.start(); |
| 663 | auto& fccItem = static_cast<FlashCacheItem&>(item); |
| 664 | if (!inserted) { |
| 665 | cache_->addHole(fccItem.getTotalSize()); |
| 666 | } |
| 667 | if (fccItem.isAllocPath() && fccItem.getRegionDescriptor().isReady()) { |
| 668 | cache_->regionManager_.close(std::move(fccItem.getRegionDescriptor())); |
| 669 | } |
| 670 | // Item is stored inline in the Handle's buffer; destroy without deallocating |
| 671 | item.~CacheItem(); |
| 672 | stats_->release_.throughput_.successes_.inc(); |
| 673 | } |
| 674 | |
| 675 | UnitResult FlashCacheComponent::shutdown() { |
| 676 | try { |
nothing calls this directly
no test coverage detected