Skip to content

Commit

Permalink
lib-storage: Add comment to how mail_cache_field_can/want_add() is used
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Jan 25, 2018
1 parent 69a43b0 commit f22e0ce
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lib-storage/index/index-mail.c
Expand Up @@ -847,6 +847,10 @@ index_mail_want_cache(struct index_mail *mail, enum index_cache_field field)
if ((mail->data.dont_cache_fetch_fields & fetch_field) != 0)
return FALSE;

/* If a field has been explicitly requested to be fetched, it's
included in data.cache_fetch_fields. In that case use _can_add() to
add it to the cache file if at all possible. Otherwise, use
_want_add() to use previous caching decisions. */
cache_field = mail->ibox->cache_fields[field].idx;
if ((mail->data.cache_fetch_fields & fetch_field) != 0) {
return mail_cache_field_can_add(_mail->transaction->cache_trans,
Expand Down

0 comments on commit f22e0ce

Please sign in to comment.