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

SerializingCacheProvider<TResult, TSerialized>

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

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

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

Puts the specified value in the cache.

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

Gets a value from the cache.