summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-08-19 08:00:09 +0000
committeralecpl <alec@alec.pl>2011-08-19 08:00:09 +0000
commit2ce8e5dd94246e9c0bd0b2dd795cc779d1ef766a (patch)
tree99e41ea421b3e58a72b7d5a10d79dbe33a742b8a
parent58504870d4844440917036096a84cd8799adb052 (diff)
- Use internal cache for mailbox_info() result
-rw-r--r--program/include/rcube_imap.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/program/include/rcube_imap.php b/program/include/rcube_imap.php
index 0e28b083a..6a35af0a8 100644
--- a/program/include/rcube_imap.php
+++ b/program/include/rcube_imap.php
@@ -3513,6 +3513,10 @@ class rcube_imap
*/
function mailbox_info($mailbox)
{
+ if ($this->icache['options'] && $this->icache['options']['name'] == $mailbox) {
+ return $this->icache['options'];
+ }
+
$acl = $this->get_capability('ACL');
$namespace = $this->get_namespace();
$options = array();
@@ -3574,6 +3578,8 @@ class rcube_imap
$options['norename'] = $options['is_root'] || $options['namespace'] != 'personal';
}
+ $this->icache['options'] = $options;
+
return $options;
}