Add imap_cache_ttl option to configure TTL of imap_cache
| | |
| | | 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) |
| | |
| | | // 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'; |
| | | |
| | |
| | | { |
| | | 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); |
| | | } |
| | | |