| 243 | } |
| 244 | |
| 245 | void PersistentCacheImpl::ForceEvict(const Slice& key) { |
| 246 | std::unique_ptr<CacheFile> file{metadata_.ForceEvict(key)}; |
| 247 | if (file) { |
| 248 | assert(!file->refs_); |
| 249 | if (DeleteFileAndReleaseCache(file.get()).ok()) { |
| 250 | LEVELDB_LOG("Remove force evicted cache file: %s.", file->Path().c_str()); |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | void PersistentCacheImpl::ForceEvict(CacheFile* file) { metadata_.ForceEvict(file); } |
| 256 |