cache-once
Cache results of HTTP requests, db queries etc. calling initialization logic exactly once in a thread safe manner. It's supposed to be used for in-memory cache only. If you have do-it-once
requirement across several processes you need something different like distributed lock or leader election.
It's implemented as a set of extension methods for IMemoryCache.
Tasks
- fix benchmarks
- add this https://adamsitnik.com/ConcurrencyVisualizer-Profiler/
- read https://developers.google.com/api-client-library/dotnet/guide/aaa_oauth for inspiration
- try fine grained lock approach - https://github.com/khalidsalomao/SimpleHelpers.Net/blob/master/SimpleHelpers/NamedLock.cs