fix problem selecting imap messages after imap uid validity rolls, r/sr=sspitzer 145638

git-svn-id: svn://10.0.0.236/trunk@144238 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bienvenu%netscape.com
2003-06-28 00:40:08 +00:00
parent edb59db805
commit d7713c0a0d

View File

@@ -7753,7 +7753,12 @@ nsresult nsImapMockChannel::OpenCacheEntry()
if (folderSink)
folderSink->GetUidValidity(&uidValidity);
}
return cacheSession->AsyncOpenCacheEntry(urlSpec.get(), nsICache::ACCESS_READ_WRITE, this);
// stick the uid validity in front of the url, so that if the uid validity
// changes, we won't re-use the wrong cache entries.
nsCAutoString cacheKey;
cacheKey.AppendInt(uidValidity, 16);
cacheKey.Append(urlSpec);
return cacheSession->AsyncOpenCacheEntry(cacheKey.get(), nsICache::ACCESS_READ_WRITE, this);
}
nsresult nsImapMockChannel::ReadFromMemCache(nsICacheEntryDescriptor *entry)