Rename message_cache_lifetime to messages_cache_ttl option for naming consistency
| | |
| | | // 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 |
| | |
| | | 'reply_mode' => 'top_posting', |
| | | 'refresh_interval' => 'keep_alive', |
| | | 'min_refresh_interval' => 'min_keep_alive', |
| | | 'messages_cache_ttl' => 'message_cache_lifetime', |
| | | ); |
| | | |
| | | |
| | |
| | | { |
| | | 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); |
| | | } |
| | | |
| | |
| | | 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); |
| | | } |
| | | |