| 18 | } |
| 19 | |
| 20 | PersistentCacheMetaData::CacheFileWrapper PersistentCacheMetaData::Lookup(uint64_t cache_id) { |
| 21 | CacheFile* ret = nullptr; |
| 22 | CacheFile lookup_key(cache_id); |
| 23 | bool ok = cache_file_index_.Find(&lookup_key, &ret); |
| 24 | if (ok) { |
| 25 | assert(ret->refs_); |
| 26 | return CacheFileWrapper{ret, [](CacheFile* f) { --f->refs_; }}; |
| 27 | } |
| 28 | return nullptr; |
| 29 | } |
| 30 | |
| 31 | CacheFile* PersistentCacheMetaData::Evict() { |
| 32 | CacheFile* evicted_file = nullptr; |
no test coverage detected