MCPcopy Create free account
hub / github.com/dhbloo/rapfi / sync

Method sync

Rapfi/database/dbclient.cpp:783–797  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783void DBClient::sync(bool clearCache)
784{
785 for (auto &[hashKey, entryCache] : dbCache) {
786 if (entryCache.dirty) {
787 storage.set(entryCache.key, entryCache.record, mask);
788 entryCache.dirty = false;
789 }
790 }
791
792 if (clearCache) {
793 // Clear all cache as records in dbStorage might be newer
794 dbCache.clear();
795 dbRecordCache.clear();
796 }
797}
798
799} // namespace Database

Callers 2

editDatabaseTVDFunction · 0.45
searchMethod · 0.45

Calls 2

setMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected