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

SerializingCacheProvider<TSerialized>

public class SerializingCacheProvider<TSerialized> : ISyncCacheProvider
Defines an ISyncCacheProvider 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(ISyncCacheProvider<TSerialized> wrappedCacheProvider, ICacheItemSerializer<object, TSerialized> serializer)

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

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

Puts the specified value in the cache.

public ValueTuple<bool, object> TryGet(string key)

Gets a value from the cache.