<PackageReference Include="Polly" Version="7.1.0" />

IAsyncCacheProvider<TResult>

public interface IAsyncCacheProvider<TResult>
Defines methods for classes providing asynchronous cache functionality for Polly CachePolicy<T>s.
using System.Threading; using System.Threading.Tasks; namespace Polly.Caching { public interface IAsyncCacheProvider<TResult> { Task<(bool, TResult)> TryGetAsync(string key, CancellationToken cancellationToken, bool continueOnCapturedContext); Task PutAsync(string key, TResult value, Ttl ttl, CancellationToken cancellationToken, bool continueOnCapturedContext); } }