public TResult Get(TKey key) { var reference = cache.Get(key); if (!reference.TryGetTarget(out var ret)) { cache.Forget(key); ret = Get(key); // will not loop because Forget means the TryGetTarget will succeed next time } lastResult = null !; return(ret); }
public Task <TResult> Get(TKey key) => cache.Get(key).Task;