* emailadmin: caching nameSpace information for the session to reduce communication to imap-server with the goal of improved performance clientside and less querying the mailserver

This commit is contained in:
Klaus Leithoff 2011-09-21 09:06:04 +00:00
parent 46bcd9c5ba
commit 035aaa6134

View File

@ -401,6 +401,10 @@ class defaultimap extends Net_IMAP
if(!$this->_connected) {
return false;
}
static $nameSpace;
if (is_null($nameSpace)) $nameSpace =& egw_cache::getSession('emailadmin','defaultimap_nameSpace');
if (isset($nameSpace[$this->ImapServerId])) return $nameSpace[$this->ImapServerId];
$retrieveDefault = false;
if($this->hasCapability('NAMESPACE')) {
$nameSpace = $this->getNamespace();
@ -433,7 +437,7 @@ class defaultimap extends Net_IMAP
)
);
}
$nameSpace[$this->ImapServerId] = $result;
return $result;
}