This documentation is archived and is not being maintained.

Cache Members

Cache overview

Public Fields

public fieldstatic (Shared in Visual Basic)NoAbsoluteExpiration Used in the absoluteExpiration parameter in an Insert method call to indicate the item should never expire. This field is read-only.
public fieldstatic (Shared in Visual Basic)NoSlidingExpiration Used as the slidingExpiration parameter in an Insert or Add method call to disable sliding expirations. This field is read-only.

Public Properties

public propertyCount Gets the number of items stored in the cache.
public propertyItem Gets or sets the cache item at the specified key.

In C#, this property is the indexer for the Cache class.

Public Methods

public methodAdd Adds the specified item to the Cache object with dependencies, expiration and priority policies, and a delegate you can use to notify your application when the inserted item is removed from the Cache.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodGet Retrieves the specified item from the Cache object.
public methodGetEnumerator Retrieves a dictionary enumerator used to iterate through the key settings and their values contained in the cache.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodInsert Overloaded. Inserts an item into the Cache object. Use one of the versions of this method to overwrite an existing Cache item with the same key parameter.
public methodRemove Removes the specified item from the application's Cache object.
public methodToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

Cache Class | System.Web.Caching Namespace