# HG changeset patch # User Timo Sirainen # Date 1487786668 -7200 # Node ID d439e77f6b1f8868c160c9c132664ec6371e8760 # Parent 3243312b3d884e64874bc640ce313fb1ca590c4a pop3c: Remove unnecessarily duplicated code setting vsize to cache This is important now that the vsize can be added also to index's vsize extension. diff -r 3243312b3d88 -r d439e77f6b1f src/lib-storage/index/pop3c/pop3c-mail.c --- a/src/lib-storage/index/pop3c/pop3c-mail.c Wed Feb 22 20:03:43 2017 +0200 +++ b/src/lib-storage/index/pop3c/pop3c-mail.c Wed Feb 22 20:04:28 2017 +0200 @@ -110,22 +110,13 @@ static void pop3c_mail_cache_size(struct index_mail *mail) { - struct mail *_mail = &mail->mail.mail; uoff_t size; - unsigned int cache_idx; if (i_stream_get_size(mail->data.stream, TRUE, &size) <= 0) return; mail->data.virtual_size = size; - - cache_idx = mail->ibox->cache_fields[MAIL_CACHE_VIRTUAL_FULL_SIZE].idx; - if (mail_cache_field_exists(_mail->transaction->cache_view, - _mail->seq, cache_idx) == 0) { - index_mail_cache_add_idx(mail, cache_idx, &size, sizeof(size)); - /* make sure it's not cached twice */ - mail->data.dont_cache_fetch_fields |= - MAIL_CACHE_VIRTUAL_FULL_SIZE; - } + /* it'll be actually added to index when closing the mail in + index_mail_cache_sizes() */ } static void