Create a memory cache. It's main API - method GetOrAdd(key, valueFactory, token)
. Cache should return value by key, if the value is present. Otherwise, it should asynchronously invoke valueFactory
to get value, and store value that was returned.
If second call with same key is performed, while first call is still executing, it should not perform additional valueFactory
invocation.
public interface ICache