IAsyncCacheProvider<TResult>
Defines methods for classes providing asynchronous cache functionality for Polly CachePolicy<T>s.
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
namespace Polly.Caching
{
[System.Runtime.CompilerServices.NullableContext(1)]
public interface IAsyncCacheProvider<[System.Runtime.CompilerServices.Nullable(2)] TResult>
{
[return: System.Runtime.CompilerServices.Nullable(new byte[] {
1,
0,
2
})]
Task<(bool, TResult)> TryGetAsync(string key, CancellationToken cancellationToken, bool continueOnCapturedContext);
Task PutAsync(string key, [System.Runtime.CompilerServices.Nullable(2)] TResult value, Ttl ttl, CancellationToken cancellationToken, bool continueOnCapturedContext);
}
}