AspNetCacheProvider Class


An in-process implementation of the ICacheProvider interface that internally uses the System.Web.Caching.Cache.

public class AspNetCacheProvider : ICacheProvider, IProvider, IExtension
System.Object → AspNetCacheProvider
ICacheProvider, IProvider, IExtension




Hits Gets the total number of cache hits.
Misses Gets the total number of cache misses.


Clear() Removes all items from the Cache.
Clear(CacheRegion) Removes all items from the CacheRegion.
Exists(CacheRegion, String) Checks if the specified item exists in the cache.
Get(CacheRegion, String) Retrieves the specified item from the cache.
GetCacheKey(CacheRegion, String) Gets the composite cache key for the specified CacheRegion and item key.
GetRegionKey(CacheRegion) Gets the cache key for the specified CacheRegion.
Initialize(NameValueCollection) Initializes the provider with the specified configuration settings.
Put(CacheRegion, String, T) Inserts an item into the Cache object with a cache key to reference its location.
Remove(CacheRegion, String[]) Removes the specified items from the cache.
RemoveEndingWith(CacheRegion, String[]) Removes all items ending with the specified keys.
RemoveStartingWith(CacheRegion, String[]) Removes all items starting with the specified keys.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(Object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(Object, Nullable, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(Object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.