mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-10 01:11:22 +00:00
Store changeNumber maps with modseq in cache for subfolders
By getting the root folder/container whose properties are stored in OpenChange DB. This makes the synchronisation of sub-folders faster as when we evaluate restrictions for this folder, we are able to get the modseq from where to get the latest messages unseen by the client.
This commit is contained in:
@@ -682,9 +682,9 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||
{
|
||||
/* This method should be called whenever something has changed on the folder.
|
||||
Then we will perform two actions:
|
||||
1 - Update its PidTagChangeNumber property.
|
||||
1 - Update the PidTagChangeNumber property of the root container.
|
||||
2 - Store relationship PidTagChangenumber with lastModseq value on the
|
||||
mapping given as parameter */
|
||||
mapping given as parameter for this folder */
|
||||
uint64_t *current_cn;
|
||||
struct SRow row;
|
||||
struct SPropValue prop;
|
||||
@@ -699,10 +699,11 @@ _compareFetchResultsByMODSEQ (id entry1, id entry2, void *data)
|
||||
prop.value.d = 0; // It doesn't matter, it will be autogenerated
|
||||
row.lpProps = ∝
|
||||
|
||||
/* We are doing a "touch" operation to update change number of this folder */
|
||||
/* We are doing a "touch" operation to update change number of the root container.
|
||||
We get the root container as it has the properties in the OpenChange DB */
|
||||
username = [[self context] connectionInfo]->username;
|
||||
oc_ctx = [[self context] connectionInfo]->oc_ctx;
|
||||
fid = [self objectId];
|
||||
fid = [[self rootContainer] objectId];
|
||||
retval = openchangedb_set_folder_properties(oc_ctx, username, fid, &row);
|
||||
if (retval != MAPI_E_SUCCESS)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user