Mercurial > dovecot > core-2.2
changeset 22443:6ad4c4203dba
lib-storage: Call mail_cache_close_mail() when mail is closed
Fixes caching problems with INDEX=MEMORY
author | Timo Sirainen <timo.sirainen@dovecot.fi> |
---|---|
date | Fri, 18 Aug 2017 17:38:34 +0300 |
parents | a6f1f04b70e4 |
children | 280d78e7fec8 |
files | src/lib-storage/index/index-mail.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c Fri Aug 18 17:34:14 2017 +0300 +++ b/src/lib-storage/index/index-mail.c Fri Aug 18 17:38:34 2017 +0300 @@ -1693,6 +1693,10 @@ } 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);