| 75 | } |
| 76 | |
| 77 | void BackupSizeCache::invalidate(u64 id) |
| 78 | { |
| 79 | std::lock_guard<std::mutex> lock(mMutex); |
| 80 | mCache.erase(id); |
| 81 | // If a compute for this id is in flight, tell it to discard its (now stale) |
| 82 | // result so the next request recomputes against the current folders. |
| 83 | if (mPending.count(id) != 0) { |
| 84 | mDirty.insert(id); |
| 85 | } |
| 86 | mGeneration.fetch_add(1); |
| 87 | } |
| 88 | |
| 89 | void BackupSizeCache::pause(void) |
| 90 | { |
no test coverage detected