I need to create an application to read 500 exchange email accounts, I am using EWS and AutodiscoverUrl.
As per Microsoft documentation is a best practice cache the autodiscover response and use autodiscover for each mailbox one wants to read, I have two questions:
PS
I'm using EWS Managed API and want to cache only the EWS URL.
The autodiscover response is just XML . In theory, you can cache it any number of ways (eg the AppDomain cache, Caching application block) but System.Runtime.Caching.MemoryCache seems to be the recommended in process cache for .Net 4 and up. If your are talking about a web app, I guess you might consider the HttpCache.
Regarding caching for each mailbox, I think the answer is yes. You would cache the Autodiscover endpoint information, and then invoke GetUserSettings for each mailbox, using the cached Autodiscover information.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.