Skip to content

Commit

Permalink
Merge pull request #5192 from brong/no-intermediate-cache
Browse files Browse the repository at this point in the history
sync_support: don't cache intermediate records
  • Loading branch information
brong authored Jan 5, 2025
2 parents d2e2787 + 6615e04 commit f5ae3de
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions imap/sync_support.c
Original file line number Diff line number Diff line change
Expand Up @@ -6551,14 +6551,13 @@ int sync_do_update_mailbox(struct sync_client_state *sync_cs,
sync_send_apply(kl, sync_cs->backend->out);
r = sync_parse_response("MAILBOX", sync_cs->backend->in, NULL);

// on error, clear cache - otherwise cache this state
if (r) sync_uncache(sync_cs, mbentry->name);
else r = sync_cache(sync_cs, mbentry->name, kl);

dlist_free(&kl);
mboxlist_entry_free(&mbentry);

return 0;
// we never want to cache intermediate records
sync_uncache(sync_cs, mbentry->name);

return r;
}

mboxlist_entry_free(&mbentry);
Expand Down

0 comments on commit f5ae3de

Please sign in to comment.