add method to clear hdr cache on db (to be used when changing folders) r=naving, sr=sspitzer part of fix for 93013

This commit is contained in:
bienvenu%netscape.com 2001-09-28 23:07:27 +00:00
parent d9dc0205f3
commit f780098a4b
2 changed files with 6 additions and 0 deletions

View File

@ -116,6 +116,7 @@ interface nsIMsgDatabase : nsIDBChangeAnnouncer {
// Force closed is evil, and we should see if we can do without it.
// In 4.x, it was mainly used to remove corrupted databases.
void ForceClosed();
void clearCachedHdrs();
readonly attribute nsIDBFolderInfo dBFolderInfo;

View File

@ -163,6 +163,11 @@ nsresult nsMsgDatabase::AddHdrToCache(nsIMsgDBHdr *hdr, nsMsgKey key) // do we w
return PL_DHASH_NEXT;
}
NS_IMETHODIMP nsMsgDatabase::ClearCachedHdrs()
{
return ClearHdrCache(PR_FALSE); // don't re-init, hope db gets closed.
}
nsresult nsMsgDatabase::ClearHdrCache(PRBool reInit)
{
if (m_cachedHeaders)