Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions dconfig-center/dde-dconfig-daemon/dconfigresource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,14 @@ void DSGConfigResource::repareCache(DConfigCache *cache, DConfigMeta *oldMeta, D
qPrintable(m_key), cache->uid(), qPrintable(key));
}
}
// Serial升级时移除旧缓存值,serial升级意味着旧值必须废弃
for (const auto &key : intersectKeys) {
if (newMeta->serial(key) > oldMeta->serial(key)) {
cache->remove(key);
qDebug(cfLog, "Cache removed because of serial upgraded, resource:%s, uid:%d, key:%s.",
qPrintable(m_key), cache->uid(), qPrintable(key));
}
}
}

GenericResourceKey DSGConfigResource::key() const
Expand Down
Loading