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

Polly.Caching.CacheProviderExtensions

public static class CacheProviderExtensions
Class that provides helper methods for configuring CacheProviders.
namespace Polly.Caching { public static class CacheProviderExtensions { public static ISyncCacheProvider<TCacheFormat> For<[System.Runtime.CompilerServices.Nullable(2)] TCacheFormat>(this ISyncCacheProvider nonGenericCacheProvider); public static IAsyncCacheProvider<TCacheFormat> AsyncFor<[System.Runtime.CompilerServices.Nullable(2)] TCacheFormat>(this IAsyncCacheProvider nonGenericCacheProvider); public static SerializingCacheProvider<TSerialized> WithSerializer<[System.Runtime.CompilerServices.Nullable(2)] TSerialized>(this ISyncCacheProvider<TSerialized> cacheProvider, ICacheItemSerializer<object, TSerialized> serializer); public static SerializingCacheProvider<TResult, TSerialized> WithSerializer<[System.Runtime.CompilerServices.Nullable(2)] TResult, [System.Runtime.CompilerServices.Nullable(2)] TSerialized>(this ISyncCacheProvider<TSerialized> cacheProvider, ICacheItemSerializer<TResult, TSerialized> serializer); public static AsyncSerializingCacheProvider<TSerialized> WithSerializer<[System.Runtime.CompilerServices.Nullable(2)] TSerialized>(this IAsyncCacheProvider<TSerialized> cacheProvider, ICacheItemSerializer<object, TSerialized> serializer); public static AsyncSerializingCacheProvider<TResult, TSerialized> WithSerializer<[System.Runtime.CompilerServices.Nullable(2)] TResult, [System.Runtime.CompilerServices.Nullable(2)] TSerialized>(this IAsyncCacheProvider<TSerialized> cacheProvider, ICacheItemSerializer<TResult, TSerialized> serializer); } }