From 67ac6e354ab6c12e708415d2949936b4dc427275 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Thu, 06 Jun 2013 03:20:02 -0400
Subject: [PATCH] Rename message_cache_lifetime to messages_cache_ttl option for naming consistency

---
 program/lib/Roundcube/rcube_imap.php   |    4 ++--
 program/lib/Roundcube/rcube_config.php |    1 +
 config/main.inc.php.dist               |    5 ++---
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index 4cf94c7..506edd9 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -128,9 +128,8 @@
 // Enables messages cache. Only 'db' cache is supported.
 $rcmail_config['messages_cache'] = false;
 
-// lifetime of message cache
-// possible units: s, m, h, d, w
-$rcmail_config['message_cache_lifetime'] = '10d';
+// Lifetime of messages cache. Possible units: s, m, h, d, w
+$rcmail_config['messages_cache_ttl'] = '10d';
 
 // ----------------------------------
 // SMTP
diff --git a/program/lib/Roundcube/rcube_config.php b/program/lib/Roundcube/rcube_config.php
index f694877..bd97583 100644
--- a/program/lib/Roundcube/rcube_config.php
+++ b/program/lib/Roundcube/rcube_config.php
@@ -43,6 +43,7 @@
         'reply_mode'           => 'top_posting',
         'refresh_interval'     => 'keep_alive',
         'min_refresh_interval' => 'min_keep_alive',
+        'messages_cache_ttl'   => 'message_cache_lifetime',
     );
 
 
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index 31e7079..b362f13 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -3691,7 +3691,7 @@
     {
         if ($this->caching && !$this->cache) {
             $rcube = rcube::get_instance();
-            $ttl = $rcube->config->get('message_cache_lifetime', '10d');
+            $ttl = $rcube->config->get('messages_cache_ttl', '10d');
             $this->cache = $rcube->get_cache('IMAP', $this->caching, $ttl);
         }
 
@@ -3745,7 +3745,7 @@
     public function expunge_cache()
     {
         if ($this->mcache) {
-            $ttl = rcube::get_instance()->config->get('message_cache_lifetime', '10d');
+            $ttl = rcube::get_instance()->config->get('messages_cache_ttl', '10d');
             $this->mcache->expunge($ttl);
         }
 

--
Gitblit v1.9.1