mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 04:25:35 +08:00
Ref T237, find latest DB cache ts and only init caches if there are no or old cache data
This commit is contained in:
@@ -419,6 +419,22 @@ namespace BlackCore
|
||||
return reader->getLatestEntityTimestampFromSharedInfoObjects(entity);
|
||||
}
|
||||
|
||||
QDateTime CWebDataServices::getLatestDbEntityCacheTimestamp() const
|
||||
{
|
||||
QDateTime latest;
|
||||
const CEntityFlags::EntitySet set = CEntityFlags::asSingleEntities(CEntityFlags::AllDbEntitiesNoInfoObjects);
|
||||
for (CEntityFlags::Entity e : set)
|
||||
{
|
||||
const QDateTime ts = this->getCacheTimestamp(e);
|
||||
if (!ts.isValid()) { continue; }
|
||||
if (!latest.isValid() || latest < ts)
|
||||
{
|
||||
latest = ts;
|
||||
}
|
||||
}
|
||||
return latest;
|
||||
}
|
||||
|
||||
CEntityFlags::Entity CWebDataServices::getEntitiesWithNewerSharedFile(CEntityFlags::Entity entities) const
|
||||
{
|
||||
Q_ASSERT_X(m_sharedInfoDataReader, Q_FUNC_INFO, "Shared info reader was not initialized");
|
||||
|
||||
Reference in New Issue
Block a user