Open Bug 1897313 Opened 1 year ago Updated 3 months ago

Remove the folderCache (nsIMsgFolderCache, nsIMsgFolderCacheElement and folderCache.json)

Categories

(Thunderbird :: General, task)

Tracking

(Not tracked)

People

(Reporter: benc, Unassigned)

References

(Depends on 1 open bug)

Details

Once all the folders are in the same globalDB, there's no need to have a separate folderCache.json.
Either the globalDB will be quick enough to compute the required values on-the-fly, or it can implement it's own internal caching which makes it look like they're quick enough to compute on-the-fly.

Things would be much simpler without the foldercache. It's intrusive and brittle - the cache has to be manually updated all over the place - and has caused a bunch of bugs. e.g. Bug 1897303, Bug 1870463, Bug 1726660...

Originally the folderCache was a separate mork DB (later converted into folderCache.json).
I think the original idea was that caching some values here meant that you didn't have to open every folder's DB in turn to calculate values (e.g. number of unread messages). Some people have a lot of folders.
But with a globalDB that contains all the messages, this motivation goes away.

You need to log in before you can comment on or make changes to this bug.