<PackageReference Include="Polly" Version="5.1.1-v5-x-cachealpha0001" />

SerializingCacheProviderAsync<TResult, TSerialized>

public class SerializingCacheProviderAsync<TResult, TSerialized> : ICacheProviderAsync<TResult>
Defines an ICacheProviderAsync<T> which serializes objects of type TResult in and out of an underlying cache which caches as type TSerialized. For use with asynchronous CachePolicy.
public SerializingCacheProviderAsync(ICacheProviderAsync<TSerialized> wrappedCacheProvider, ICacheItemSerializer<TResult, TSerialized> serializer)

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

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

Gets a value from the cache asynchronously.

public Task PutAsync(string key, TResult value, TimeSpan ttl, CancellationToken cancellationToken, bool continueOnCapturedContext)

Puts the specified value in the cache asynchronously.