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



commit a075969d782d283968e0495610c99c466f2a35a6
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 37a8122..ac25cea 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]