CacheProviderExtensions
Class that provides helper methods for configuring CacheProviders.
public static ICacheProvider<TCacheFormat> As<TCacheFormat>(this ICacheProvider nonGenericCacheProvider)
Provides a strongly TCacheFormat-typed version of the supplied ICacheProvider
public static ICacheProviderAsync<TCacheFormat> AsyncAs<TCacheFormat>(this ICacheProviderAsync nonGenericCacheProvider)
Provides a strongly TCacheFormat-typed version of the supplied ICacheProviderAsync
public static SerializingCacheProvider<TSerialized> WithSerializer<TSerialized>(this ICacheProvider<TSerialized> cacheProvider, ICacheItemSerializer<object, TSerialized> serializer)
Wraps the serializer around the cacheProvider so that delegate return values of any type can be stored in the cache as type TSerialized.
public static SerializingCacheProvider<TResult, TSerialized> WithSerializer<TResult, TSerialized>(this ICacheProvider<TSerialized> cacheProvider, ICacheItemSerializer<TResult, TSerialized> serializer)
Wraps the serializer around the cacheProvider so that delegate return values of type TResult can be stored in the cache as type TSerialized.
public static SerializingCacheProviderAsync<TSerialized> WithSerializer<TSerialized>(this ICacheProviderAsync<TSerialized> cacheProvider, ICacheItemSerializer<object, TSerialized> serializer)
Wraps the serializer around the asynchronous cacheProvider so that delegate return values of any type can be stored in the cache as type TSerialized.
public static SerializingCacheProviderAsync<TResult, TSerialized> WithSerializer<TResult, TSerialized>(this ICacheProviderAsync<TSerialized> cacheProvider, ICacheItemSerializer<TResult, TSerialized> serializer)
Wraps the serializer around the asynchronous cacheProvider so that delegate return values of type TResult can be stored in the cache as type TSerialized.