summaryrefslogtreecommitdiff
path: root/program/lib/Roundcube/rcube_imap.php
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2013-10-07 09:26:37 +0200
committerAleksander Machniak <alec@alec.pl>2013-10-07 09:26:37 +0200
commitaceb0149b8f7f6c57e8dd6ba6f69aa0d6cacc6bc (patch)
tree521486fa51c44aecde04b782af32c975a5067d69 /program/lib/Roundcube/rcube_imap.php
parent4daaa09438bc05f9d5d6cf339cc0b60b511057e9 (diff)
Add possibility to programmatically set cache mode, so it is possible
to cache only indexes/threads but not messages
Diffstat (limited to 'program/lib/Roundcube/rcube_imap.php')
-rw-r--r--program/lib/Roundcube/rcube_imap.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/program/lib/Roundcube/rcube_imap.php b/program/lib/Roundcube/rcube_imap.php
index aa074233f..9faf1bbc6 100644
--- a/program/lib/Roundcube/rcube_imap.php
+++ b/program/lib/Roundcube/rcube_imap.php
@@ -3760,12 +3760,17 @@ class rcube_imap extends rcube_storage
/**
* Enable or disable messages caching
*
- * @param boolean $set Flag
+ * @param boolean $set Flag
+ * @param int $mode Cache mode
*/
- public function set_messages_caching($set)
+ public function set_messages_caching($set, $mode = null)
{
if ($set) {
$this->messages_caching = true;
+
+ if ($mode && ($cache = $this->get_mcache_engine())) {
+ $cache->set_mode($mode);
+ }
}
else {
if ($this->mcache) {
@@ -3800,7 +3805,7 @@ class rcube_imap extends rcube_storage
* Clears the messages cache.
*
* @param string $folder Folder name
- * @param array $uids Optional message UIDs to remove from cache
+ * @param array $uids Optional message UIDs to remove from cache
*/
protected function clear_message_cache($folder = null, $uids = null)
{