| 348 | } |
| 349 | |
| 350 | void PersistentCacheImpl::GarbageCollect() { |
| 351 | std::vector<std::unique_ptr<CacheFile>> evictable_files = metadata_.CollectEvictableFiles(); |
| 352 | for (auto& file : evictable_files) { |
| 353 | assert(!file->refs_); |
| 354 | DeleteFileAndReleaseCache(file.get()); |
| 355 | LEVELDB_LOG("Remove evictable file in GC: %lu.rc.", file->cacheid()); |
| 356 | } |
| 357 | } |
| 358 | |
| 359 | Status NewPersistentCache(const PersistentCacheConfig& config, |
| 360 | std::shared_ptr<PersistentCache>* cache) { |
nothing calls this directly
no test coverage detected