dovecot-2.2: virtual plugin: Disable caching via mailbox list in...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Sep 22 10:51:31 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/587226389203
changeset: 19177:587226389203
user: Timo Sirainen <tss at iki.fi>
date: Tue Sep 22 13:50:08 2015 +0300
description:
virtual plugin: Disable caching via mailbox list indexes.
Otherwise e.g. STATUS can give stale replies.
diffstat:
src/plugins/virtual/virtual-storage.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
diffs (39 lines):
diff -r 0d3a438c8928 -r 587226389203 src/plugins/virtual/virtual-storage.c
--- a/src/plugins/virtual/virtual-storage.c Tue Sep 22 01:05:09 2015 +0300
+++ b/src/plugins/virtual/virtual-storage.c Tue Sep 22 13:50:08 2015 +0300
@@ -701,6 +701,24 @@
return index_storage_is_inconsistent(box);
}
+static int
+virtual_list_index_has_changed(struct mailbox *box ATTR_UNUSED,
+ struct mail_index_view *list_view ATTR_UNUSED,
+ uint32_t seq ATTR_UNUSED)
+{
+ /* we don't have any quick and easy optimizations for tracking
+ virtual folders. ideally we'd completely disable mailbox list
+ indexes for them, but this is the easiest way to do it for now. */
+ return 1;
+}
+
+static void
+virtual_list_index_update_sync(struct mailbox *box ATTR_UNUSED,
+ struct mail_index_transaction *trans ATTR_UNUSED,
+ uint32_t seq ATTR_UNUSED)
+{
+}
+
struct mail_storage virtual_storage = {
.name = VIRTUAL_STORAGE_NAME,
.class_flags = MAIL_STORAGE_CLASS_FLAG_NOQUOTA,
@@ -738,8 +756,8 @@
index_storage_attribute_iter_init,
index_storage_attribute_iter_next,
index_storage_attribute_iter_deinit,
- NULL,
- NULL,
+ virtual_list_index_has_changed,
+ virtual_list_index_update_sync,
virtual_storage_sync_init,
index_mailbox_sync_next,
index_mailbox_sync_deinit,
More information about the dovecot-cvs
mailing list