C# Класс EFBootstrap.Caching.CacheManager

Encapsulates methods that allow the caching and retrieval of objects.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddItem ( string key, object value, System.Runtime.Caching.CacheItemPolicy policy = null, string regionName = null ) : bool

Adds an item to the cache.

Clear ( string regionName = null ) : bool

Clears the cache.

GetItem ( string key, string regionName = null ) : object

Fetches an item matching the given key from the cache.

RemoveItem ( string key, string regionName = null ) : bool

Removes an item matching the given key from the cache.

UpdateItem ( string key, object value, System.Runtime.Caching.CacheItemPolicy policy = null, string regionName = null ) : bool

Updates an item to the cache.

Описание методов

AddItem() публичный статический Метод

Adds an item to the cache.
public static AddItem ( string key, object value, System.Runtime.Caching.CacheItemPolicy policy = null, string regionName = null ) : bool
key string /// A unique identifier for the cache entry. ///
value object /// The object to insert. ///
policy System.Runtime.Caching.CacheItemPolicy /// Optional. An object that contains eviction details for the cache entry. This object /// provides more options for eviction than a simple absolute expiration. The default value for the optional parameter /// is null. ///
regionName string /// Optional. A named region in the cache to which the cache entry can be added, /// if regions are implemented. The default value for the optional parameter /// is null. ///
Результат bool

Clear() публичный статический Метод

Clears the cache.
public static Clear ( string regionName = null ) : bool
regionName string /// The region name. ///
Результат bool

GetItem() публичный статический Метод

Fetches an item matching the given key from the cache.
public static GetItem ( string key, string regionName = null ) : object
key string /// A unique identifier for the cache entry. ///
regionName string /// Optional. A named region in the cache to which the cache entry can be added, /// if regions are implemented. The default value for the optional parameter /// is null. ///
Результат object

RemoveItem() публичный статический Метод

Removes an item matching the given key from the cache.
public static RemoveItem ( string key, string regionName = null ) : bool
key string /// A unique identifier for the cache entry. ///
regionName string /// Optional. A named region in the cache to which the cache entry can be added, /// if regions are implemented. The default value for the optional parameter /// is null. ///
Результат bool

UpdateItem() публичный статический Метод

Updates an item to the cache.
public static UpdateItem ( string key, object value, System.Runtime.Caching.CacheItemPolicy policy = null, string regionName = null ) : bool
key string /// A unique identifier for the cache entry. ///
value object /// The object to insert. ///
policy System.Runtime.Caching.CacheItemPolicy /// Optional. An object that contains eviction details for the cache entry. This object /// provides more options for eviction than a simple absolute expiration. The default value for the optional parameter /// is null. ///
regionName string /// Optional. A named region in the cache to which the cache entry can be added, /// if regions are implemented. The default value for the optional parameter /// is null. ///
Результат bool