ICacheProvider Interface

Namespace:
Weavy.Core.Providers
Assembly:
Weavy.Core.dll

Interface for cache providers.

public interface ICacheProvider : IProvider, IExtension

Properties

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

Methods

Clear() Removes all items from the cache.
Clear(CacheRegion) Removes all items from the cache region.
Count() Gets the number of entities in the cache.
Exists(CacheRegion, String) Checks if the specified item exists in the cache.
Get(CacheRegion, String) Retrieves the specified item from the cache.
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.