MCPcopy Create free account
hub / github.com/BernardoGiordano/Checkpoint / invalidate

Method invalidate

3ds/source/backupsize.cpp:70–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68}
69
70void BackupSizeCache::invalidate(u64 id, BackupKind kind, const std::u16string& rootPath)
71{
72 std::lock_guard<std::mutex> lock(mMutex);
73 mTotals.erase(key(id, kind));
74 // Drop every per-backup entry sitting under this root.
75 for (auto it = mBackupSizes.begin(); it != mBackupSizes.end();) {
76 if (it->first.compare(0, rootPath.size(), rootPath) == 0) {
77 it = mBackupSizes.erase(it);
78 }
79 else {
80 ++it;
81 }
82 }
83 mGeneration.fetch_add(1);
84}
85
86void BackupSizeCache::invalidateAll(void)
87{

Callers 1

handleEventsMethod · 0.45

Calls 6

keyFunction · 0.85
compareMethod · 0.80
eraseMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected