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

SerializingCacheProvider<TSerialized>

public class SerializingCacheProvider<TSerialized> : ICacheProvider
Defines an ICacheProvider which serializes objects of any type in and out of an underlying cache which caches as type TSerialized. For use with synchronous CachePolicy.
public SerializingCacheProvider(ICacheProvider<TSerialized> wrappedCacheProvider, ICacheItemSerializer<object, TSerialized> serializer)

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

public object Get(string key)

Gets a value from the cache.

public void Put(string key, object value, TimeSpan ttl)

Puts the specified value in the cache.