C# Класс Subtext.Framework.ContentCache

This is a replacement for the Cache object. Use this when caching content. This ensures content is cached according to key and Locale.
Наследование: IEnumerable
Показать файл Открыть проект

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

Метод Описание
Get ( string key ) : object

Retrieves the specified item from the System.Web.Caching.Cache.

GetEnumerator ( ) : IEnumerator

Returns an enumerator that can iterate through a collection.

Insert ( string key, object value ) : void

Inserts the specified object to the System.Web.Caching.Cache object with a cache key to reference its location and using default values provided by the System.Web.Caching.CacheItemPriority enumeration.

Insert ( string key, object value, System.Web.Caching.CacheDependency cacheDependency ) : void

Inserts the specified object to the System.Web.Caching.Cache object with a cache key to reference its location and using default values provided by the System.Web.Caching.CacheItemPriority enumeration.

Allows specifying a CacheDependency

Insert ( string key, object value, CacheDuration cacheDuration ) : void

Inserts the specified object to the System.Web.Caching.Cache object with a cache key to reference its location and using default values provided by the System.Web.Caching.CacheItemPriority enumeration.

Allows specifying a general cache duration.

Instantiate ( ) : ContentCache

Instantiates the specified content cache from the specific HttpContext. At some point, we might consider replacing HttpContext with a type we can extend.

Remove ( string key ) : object

Removes the specified item from the cache.

this ( string key ) : object

Gets or sets the Object with the specified key.

Приватные методы

Метод Описание
ContentCache ( ) : System
ContentCache ( Cache cache ) : System

Initializes a new instance of the ContentCache class. The specified Cache instance is wrapped by this instance.

GetCacheKey ( string key ) : string

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

Get() публичный Метод

Retrieves the specified item from the System.Web.Caching.Cache.
public Get ( string key ) : object
key string
Результат object

GetEnumerator() публичный Метод

Returns an enumerator that can iterate through a collection.
public GetEnumerator ( ) : IEnumerator
Результат IEnumerator

Insert() публичный Метод

Inserts the specified object to the System.Web.Caching.Cache object with a cache key to reference its location and using default values provided by the System.Web.Caching.CacheItemPriority enumeration.
public Insert ( string key, object value ) : void
key string The key.
value object The value.
Результат void

Insert() публичный Метод

Inserts the specified object to the System.Web.Caching.Cache object with a cache key to reference its location and using default values provided by the System.Web.Caching.CacheItemPriority enumeration.

Allows specifying a CacheDependency

public Insert ( string key, object value, System.Web.Caching.CacheDependency cacheDependency ) : void
key string The key.
value object The value.
cacheDependency System.Web.Caching.CacheDependency The cache dependency.
Результат void

Insert() публичный Метод

Inserts the specified object to the System.Web.Caching.Cache object with a cache key to reference its location and using default values provided by the System.Web.Caching.CacheItemPriority enumeration.

Allows specifying a general cache duration.

public Insert ( string key, object value, CacheDuration cacheDuration ) : void
key string The key.
value object The value.
cacheDuration CacheDuration The cache duration.
Результат void

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

Instantiates the specified content cache from the specific HttpContext. At some point, we might consider replacing HttpContext with a type we can extend.
public static Instantiate ( ) : ContentCache
Результат ContentCache

Remove() публичный Метод

Removes the specified item from the cache.
public Remove ( string key ) : object
key string The key.
Результат object

this() публичный Метод

Gets or sets the Object with the specified key.
public this ( string key ) : object
key string
Результат object