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