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
Mostra file Open project: ayende/Subtext

Public Methods

Method 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

Method 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 method

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

GetEnumerator() public method

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

Insert() public method

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.
return void

Insert() public method

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.
return void

Insert() public method

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.
return void

Instantiate() public static method

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
return ContentCache

Remove() public method

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

this() public method

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