开发者

How to store mail info for mail client

开发者 https://www.devze.com 2023-01-14 05:37 出处:网络
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'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

精彩评论

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