开发者

How to store mail info for mail client

I'm working on a side project right now for an email client. I'm using a library to handle the retrieval of the messages from the server. However, I have a question on caching.

I don't want to fetch the entire list of headers everytime I load the client. Ideally, what I'd like to do is cache them and then update the list with what is on the server.

What's the best way to go about this? Should I sto开发者_高级运维re all the header information (including the server's message ID #) in a database, load the headers from that DB. Then as a background task sync up with the server...

Or is there a better way?


Look at the webmail sample of this open source project that use local caching:

http://mailsystem.codeplex.com/

If I remember well, he used a combination of local RFC822 plain text email storing with the message id as the filename and an index file with high level data.

Maybe the message itself where zipped to save disc space.

That's just a sample for the library, so don't expect code art there, but that's a start.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜