]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-index: Fix setting initial last_used for fields in mail_[always_]cache_fields
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Mon, 11 May 2020 14:23:19 +0000 (17:23 +0300)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Tue, 12 May 2020 17:08:40 +0000 (17:08 +0000)
commit6a728e6d8426074fcb55cc3d13269fadb1795418
treefd7889e3edce1d0728e4ce64c73e018d8900eedb
parentd65235321251bf85400a4c75ca20ff599ca78013
lib-index: Fix setting initial last_used for fields in mail_[always_]cache_fields

These fields had last_used=0 until the field was accessed. If cache was
purged before this access, the field was dropped. Fixed by assuming
(last_used=0, decision!=NO) is still the first time the field is being
used. This also causes it to trigger mail_cache_decision_changed event.
src/lib-index/mail-cache-decisions.c
src/lib-index/test-mail-cache.c