]> 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)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Tue, 10 Sep 2019 07:02:34 +0000 (10:02 +0300)
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 454497eab7465b6d057b30130bf6963b6c4e5e3d..e05d35bb0125f2765705303102917c726be1ab64 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;