I can only speculate how gmail/hotmail internally work internally.
I would expect most write operations are cached and performed in bulks on the background service rsuting in immediate cache updates only.
Similar for read operations: in most cases you can expect what user is going to do and pre-load them.
For example logging-in most likely results in several IMAP operations: logging in, getting all folders with counts, selecting INBOX and retrieving most common details for the last 50 messages. If there are unread emails those will probably be accessed and can be pre-fetched. I would expect all those details are cached.
IMAP connection is persisted on the background service, not inside the web application.
Technically as long as you don't close and dispose Imap instance the connection is maintained. You can use Noop method to make sure that it is used and is not cut by the server or any of the intermediate routers.