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

SerializingCacheProviderAsync<TSerialized>

Defines an IAsyncCacheProvider which serializes objects of any type in and out of an underlying cache which caches as type TSerialized. For use with asynchronous CachePolicy.
public SerializingCacheProviderAsync(IAsyncCacheProvider<TSerialized> wrappedCacheProvider, ICacheItemSerializer<object, TSerialized> serializer)

Initializes a new instance of the SerializingCacheProviderAsync<T, U> class.

public Task<object> GetAsync(string key, CancellationToken cancellationToken, bool continueOnCapturedContext)

Gets a value from the cache asynchronously.

public Task PutAsync(string key, object value, Ttl ttl, CancellationToken cancellationToken, bool continueOnCapturedContext)

Puts the specified value in the cache asynchronously.