From 61ccdfcfbb943abb75d3245f6c70b0c3c0b1b34c Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 6 Jun 2013 09:22:21 +0200 Subject: Add imap_cache_ttl option to configure TTL of imap_cache --- CHANGELOG | 1 + config/main.inc.php.dist | 3 +++ program/lib/Roundcube/rcube_imap.php | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index a125ad697..9536f8654 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,6 +1,7 @@ CHANGELOG Roundcube Webmail =========================== +- Add imap_cache_ttl option to configure TTL of imap_cache - Make LDAP cache engine configurable via ldap_cache and ldap_cache_ttl options - Fix legacy options handling - Fix "duplicate entry" errors on inserts to imap cache tables (#1489146) diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist index 506edd9cc..889d101d9 100644 --- a/config/main.inc.php.dist +++ b/config/main.inc.php.dist @@ -128,6 +128,9 @@ $rcmail_config['imap_cache'] = null; // Enables messages cache. Only 'db' cache is supported. $rcmail_config['messages_cache'] = false; +// Lifetime of IMAP indexes cache. Possible units: s, m, h, d, w +$rcmail_config['imap_cache_ttl'] = '10d'; + // Lifetime of messages cache. Possible units: s, m, h, d, w $rcmail_config['messages_cache_ttl'] = '10d'; diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php index b362f1316..9cd8ef7e4 100644 --- a/program/lib/Roundcube/rcube_imap.php +++ b/program/lib/Roundcube/rcube_imap.php @@ -3691,7 +3691,7 @@ class rcube_imap extends rcube_storage { if ($this->caching && !$this->cache) { $rcube = rcube::get_instance(); - $ttl = $rcube->config->get('messages_cache_ttl', '10d'); + $ttl = $rcube->config->get('imap_cache_ttl', '10d'); $this->cache = $rcube->get_cache('IMAP', $this->caching, $ttl); } -- cgit v1.2.3