The Util.Cache() method is synchronous, including the dataFetcher factory function.
Could an asynchronous version be added?
Current workaround is to cache an unpopulated serializable object (e.g., dictionary) and populate later.
An async cache is normally implemented as a synchronous cache of tasks. For example:
string html = await Util.Cache (() => new HttpClient().GetStringAsync ("https://www.linqpad.net/robots.txt"));
I'm not sure what an asynchronous version of Util.Cache would accomplish. Can you explain?
Ah, didn't think to have it return Task<T>. That'll work.