[evolution-data-server] [IMAPx] Set local cache to never expire



commit 0dc791b34de317d38197e794fd2d4d2e69e64669
Author: Milan Crha <mcrha redhat com>
Date:   Fri May 2 15:31:22 2014 +0200

    [IMAPx] Set local cache to never expire
    
    This is not like an HTTP cache, the downloaded messages might not be
    discarded periodically, because, apart of other things, it breaks
    the "Copy for offline usage" option.

 camel/providers/imapx/camel-imapx-folder.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-folder.c b/camel/providers/imapx/camel-imapx-folder.c
index af5b92f..3f156f1 100644
--- a/camel/providers/imapx/camel-imapx-folder.c
+++ b/camel/providers/imapx/camel-imapx-folder.c
@@ -1476,6 +1476,11 @@ camel_imapx_folder_new (CamelStore *store,
                return NULL;
        }
 
+       /* Ensure cache will never expire, otherwise
+        * it causes redownload of messages. */
+       camel_data_cache_set_expire_age (imapx_folder->cache, -1);
+       camel_data_cache_set_expire_access (imapx_folder->cache, -1);
+
        state_file = g_build_filename (folder_dir, "cmeta", NULL);
        camel_object_set_state_filename (CAMEL_OBJECT (folder), state_file);
        g_free (state_file);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]