diff src/lib-index/mail-cache-private.h @ 15374:debecd057f9c

lib-index: Replaced cache's deleted_space with deleted_record_count. This way when expunging messages we don't need to actually read through the cache file and calculate how many bytes will be freed, we can simply increase the deleted_record_count by 1. We'll still compress the cache file approximately after 20% of the space (records) has been deleted. This also converts the old "hole offset" header field to tracking the number of records in the cache file. Otherwise we'd have to assume that all of the messages in mailbox have a cache record, but that isn't true for users who have only temporary cache fields. This "hole offset" cannot be trusted completely, because nothing prevents old Dovecot version from simply writing a hole offset there and messing up the record counts. Because of this there are a couple of extra sanity checks for it. (Unfortunately there wasn't any easy way to simply add a new field to header without breaking backwards compatibility.)Internal Server Error