mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 22:25:04 -04:00
added missing test on mUseCache in dataservice
This commit is contained in:
parent
17c6a2c54f
commit
f63575aa21
1 changed files with 11 additions and 8 deletions
|
@ -1515,17 +1515,20 @@ int RsDataService::updateGroupMetaData(const GrpLocMetaData& meta)
|
|||
|
||||
if( mDb->sqlUpdate(GRP_TABLE_NAME, KEY_GRP_ID+ "='" + grpId.toStdString() + "'", meta.val))
|
||||
{
|
||||
RetroCursor* c = mDb->sqlQuery(GRP_TABLE_NAME, mGrpMetaColumns, "grpId='" + grpId.toStdString() + "'", "");
|
||||
if(mUseCache)
|
||||
{
|
||||
RetroCursor* c = mDb->sqlQuery(GRP_TABLE_NAME, mGrpMetaColumns, "grpId='" + grpId.toStdString() + "'", "");
|
||||
|
||||
c->moveToFirst();
|
||||
c->moveToFirst();
|
||||
|
||||
// temporarily disable the cache so that we get the value from the DB itself.
|
||||
mUseCache=false;
|
||||
auto meta = locked_getGrpMeta(*c, 0);
|
||||
mUseCache=true;
|
||||
// temporarily disable the cache so that we get the value from the DB itself.
|
||||
mUseCache=false;
|
||||
auto meta = locked_getGrpMeta(*c, 0);
|
||||
mUseCache=true;
|
||||
|
||||
if(meta)
|
||||
mGrpMetaDataCache.updateMeta(grpId,meta);
|
||||
if(meta)
|
||||
mGrpMetaDataCache.updateMeta(grpId,meta);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue