changeset 22797:2c72506cd19a

lib-storage: Fix adding body.snippet to cache Unless body.snippet was in mail_always_cache_fields, it didn't get added to the cache file.
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 25 Jan 2018 12:27:41 +0200
parents 32db0c418fd2
children 30265531b608
files src/lib-storage/index/index-mail.c
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/lib-storage/index/index-mail.c	Thu Jan 25 12:35:51 2018 +0200
+++ b/src/lib-storage/index/index-mail.c	Thu Jan 25 12:27:41 2018 +0200
@@ -1386,6 +1386,7 @@
 		cache_fields[MAIL_CACHE_BODY_SNIPPET].idx;
 	string_t *str;
 
+	mail->data.cache_fetch_fields |= MAIL_FETCH_BODY_SNIPPET;
 	if (mail->data.body_snippet == NULL) {
 		str = str_new(mail->mail.data_pool, 128);
 		if (index_mail_cache_lookup_field(mail, str, cache_field) > 0 &&