]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
imap: previews/snippets requested with lazy update the caching decision
authorMarkus Valentin <markus.valentin@open-xchange.com>
Tue, 3 Sep 2019 12:38:17 +0000 (14:38 +0200)
committerMarkus Valentin <markus.valentin@open-xchange.com>
Wed, 4 Sep 2019 09:20:39 +0000 (09:20 +0000)
If lazy is true set the lookup_abort to NOT_IN_CACHE_START_CACHING
which results in the snippet field becoming wanted for caching.

src/imap/imap-fetch-body.c

index d1fd1a37432b53a6cf85557a807c385989dd1279..d5c06c6bcad281b75b05b9ea3315ebc2c8c60c03 100644 (file)
@@ -594,7 +594,7 @@ fetch_snippet(struct imap_fetch_context *ctx, struct mail *mail,
              void *context)
 {
        const bool lazy = context != NULL;
-       enum mail_lookup_abort temp_lookup_abort = lazy ? MAIL_LOOKUP_ABORT_NOT_IN_CACHE : mail->lookup_abort;
+       enum mail_lookup_abort temp_lookup_abort = lazy ? MAIL_LOOKUP_ABORT_NOT_IN_CACHE_START_CACHING : mail->lookup_abort;
        enum mail_lookup_abort orig_lookup_abort = mail->lookup_abort;
        const char *resp, *snippet;
        int ret;