On Wed, 12 Nov 2003, Jess Nielsen wrote:
> My problem is that I have to different sessions accessing the same
> mailbox.

There is almost no legitimate reason to do that.  IMAP is not HTTP.

It's not going to be "more efficient"; nor is it going to be "faster".
IMAP servers are typically I/O bound, not CPU bound.  Either they are I/O
bound on the network to/from your client, or are I/O bound to the disk on
the mail data.  Either way, a second server session on the same mailbox
from the same client isn't going to gain anything.

What's more, some mail stores do not permit multiple opens on the same
mailbox, and either deny a second open or kill the previous open.  So, you
end up doing battle with yourself.

> When one of the sessions are deleting mails in the mailbox the other
> session still holds the data for theese deleted messages, which means
> that cache does not contain the same data as the store/mailbox.
> I would like to force an update of the stream/cache to make sure that both
> the store and cache will be in sync.

mail_ping(), or in extreme circumstances mail_check(), is all that you
need to ensure that both sessions are in sync.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

Reply via email to