Skip to content

Commit

Permalink
lib-storage: Call mail_cache_close_mail() when mail is closed
Browse files Browse the repository at this point in the history
Fixes caching problems with INDEX=MEMORY
  • Loading branch information
sirainen committed Aug 21, 2017
1 parent 9ae8da0 commit b67fe20
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib-storage/index/index-mail.c
Expand Up @@ -1693,6 +1693,10 @@ void index_mail_close(struct mail *_mail)
}

index_mail_close_streams_full(mail, TRUE);
/* Notify cache that the mail is no longer open. This mainly helps
with INDEX=MEMORY to keep all data added with mail_cache_add() in
memory until this point. */
mail_cache_close_mail(_mail->transaction->cache_trans, _mail->seq);

if (mail->data.wanted_headers != NULL)
mailbox_header_lookup_unref(&mail->data.wanted_headers);
Expand Down

0 comments on commit b67fe20

Please sign in to comment.