added caching patch from ews_wrapper