Skip to content

Commit

Permalink
lib-storage: Fix adding body.snippet to cache
Browse files Browse the repository at this point in the history
Unless body.snippet was in mail_always_cache_fields, it didn't get added to
the cache file.
  • Loading branch information
sirainen authored and villesavolainen committed Feb 5, 2018
1 parent 1bf08c7 commit 92a685a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/lib-storage/index/index-mail.c
Expand Up @@ -1386,6 +1386,7 @@ index_mail_fetch_body_snippet(struct index_mail *mail, const char **value_r)
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 &&
Expand Down

0 comments on commit 92a685a

Please sign in to comment.