C# Class 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.
Inheritance: IEnumerable
Afficher le fichier Open project: ayende/Subtext

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
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

Method Details

Get() public méthode

Retrieves the specified item from the System.Web.Caching.Cache.
public Get ( string key ) : object
key string
Résultat object

GetEnumerator() public méthode

Returns an enumerator that can iterate through a collection.
public GetEnumerator ( ) : IEnumerator
Résultat IEnumerator

Insert() public méthode

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.
Résultat void

Insert() public méthode

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.
Résultat void

Insert() public méthode

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.
Résultat void

Instantiate() public static méthode

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
Résultat ContentCache

Remove() public méthode

Removes the specified item from the cache.
public Remove ( string key ) : object
key string The key.
Résultat object

this() public méthode

Gets or sets the Object with the specified key.
public this ( string key ) : object
key string
Résultat object