Closed Bug 73819 Opened 24 years ago Closed 24 years ago

Implement new memory cache for imap and news

Categories

(MailNews Core :: Networking, defect, P2)

defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla0.9

People

(Reporter: mscott, Assigned: mscott)

References

Details

(Whiteboard: [nsbeta1+][cache])

Attachments

(3 files)

Just a tracking bug. I need to tie mailnews into the new memory cache so we can take the old cache out of the build.
Status: NEW → ASSIGNED
Keywords: nsbeta1
Priority: -- → P2
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9
Shouldn't this be OS/All?
Whiteboard: [nsbeta1+] → [nsbeta1+][cache]
mscott: let me know if you need any help making the transition.
OS: Windows 2000 → All
Hardware: PC → All
Blocks: 72528
Is there any progress in this area?
Here are the diffs for getting imap and news to use the new cache. Remaining cleanup work: 1) I haven't tested david's offline code yet to make sure offline still works 2) I haven't swept through mailnews to make sure we aren't including any of the old cache headers anywhere. 3) This patch does not contain Darin's API changes from the other day. I have some merge conflicts in nsNNTPProtocol and nsImapProtocol to clean up. I'll post new diffs against a current tree as soon as I'm done. It seems to be working quite nicely for me so far!
Cool - When you post the diffs against the tip, I'll try them out with offline imap and news (though I'll have to checkin some changes in my tree first so there will need to be an open tree).
Okay here are the final diffs submitted for review. The big picture: 1) The big mess which was formerly known as AsyncOpen for nsImapProtocol and nsNntpProtocol has been broken down into the following methods: ReadFromLocalCache (for offline) OpenCacheEntry ReadFromImap/NewsProtocol ReadFromMemCache Open cache entry makes an async call to the imap or news cache session requesting a cache entry for the url. If the callback comes back with an error we default to ReadFromImap/NewsProtocol. If we successfully got a cache entry, we then check the access flags. If we were given ACCESS_WRITE then we need to write data into the cache entry. We set this up then call ReadFromImap/NewsProtocol. If we were given ACCESS_READ then we call ReadFromMemCache. In addition both nsImapService and nsNNTPService now hang onto a nsICacheSession object which is the cache session each of those modules is using. I added an interface method to nsIImapService and nsIINntpService so I could retrieve the appropriate cache session in the protocol instance.
Scott, remember you may also get ACCESS_READ_WRITE, in which case you can read the data from the cache as well.
Looks good, Scott, but I really want to apply this patch myself and make sure the offline stuff is working. I'm building now, and after the build finishes, I'll apply the patch and try it out. I should be done before the tree opens this afternoon.
Okay I've landed the changes. Gordon, you guys should be good to go for turning off the old cache and removing it from the build!!! yippee...
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
The new code is in, and new bugs are to be filed seperately. Marking verified.
Status: RESOLVED → VERIFIED
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: