mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Cache ThreadsOldUids based on bThreadSort true/false #1507
This commit is contained in:
parent
c1e25dedb9
commit
7f94c26bee
|
@ -502,9 +502,11 @@ class MailClient
|
|||
{
|
||||
$oFolderInfo = $oMessageCollection->FolderInfo;
|
||||
|
||||
$bThreadSort = $this->bThreadSort && $this->oImapClient->hasCapability('SORT');
|
||||
|
||||
$sSerializedHashKey = null;
|
||||
if ($oCacher && $oCacher->IsInited()) {
|
||||
$sSerializedHashKey = "ThreadsOldUids/{$oFolderInfo->etag}";
|
||||
$sSerializedHashKey = "ThreadsOldUids/{$oFolderInfo->etag}/" . ($bThreadSort ? 'S' : 'N');
|
||||
$sSerializedUids = $oCacher->Get($sSerializedHashKey);
|
||||
if (!empty($sSerializedUids)) {
|
||||
$aSerializedUids = \json_decode($sSerializedUids, true);
|
||||
|
@ -517,7 +519,7 @@ class MailClient
|
|||
|
||||
$aUids = [];
|
||||
|
||||
if ($this->bThreadSort && $this->oImapClient->hasCapability('SORT')) {
|
||||
if ($bThreadSort) {
|
||||
$oParams = new MessageListParams;
|
||||
$oParams->sFolderName = $oFolderInfo->FullName;
|
||||
$oParams->sSort = 'DATE';
|
||||
|
|
Loading…
Reference in a new issue