Export (0) Print
Expand All

Cache Members

The following tables list the members exposed by the Cache type.

  Name Description
Public method Cache Initializes a new instance of the Cache class.

  Name Description
Public field Static NoAbsoluteExpiration Used in the absoluteExpiration parameter in an Insert method call to indicate the item should never expire. This field is read-only.
Public field Static NoSlidingExpiration Used as the slidingExpiration parameter in an Insert or Add method call to disable sliding expirations. This field is read-only.

  Name Description
Public property Count Gets the number of items stored in the cache.
Public property EffectivePrivateBytesLimit Gets the number of bytes available for the cache.
Public property Item Gets or sets the cache item at the specified key.

(see also Protected Methods )
  Name Description
Public method Add 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 method Equals  Overloaded. Determines whether two Object instances are equal. (inherited from Object)
Public method Get Retrieves the specified item from the Cache object.
Public method GetEnumerator Retrieves a dictionary enumerator used to iterate through the key settings and their values contained in the cache.
Public method GetHashCode  Serves as a hash function for a particular type. (inherited from Object)
Public method GetType  Gets the Type of the current instance. (inherited from Object)
Public method Insert 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 method Static ReferenceEquals  Determines whether the specified Object instances are the same instance. (inherited from Object)
Public method Remove Removes the specified item from the application's Cache object.
Public method ToString  Returns a String that represents the current Object. (inherited from Object)

  Name Description
Protected method Finalize  Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (inherited from Object)
Protected method MemberwiseClone  Creates a shallow copy of the current Object. (inherited from Object)

  Name Description
Explicit interface implementation Method System.Collections.IEnumerable.GetEnumerator Returns an enumerator that can iterate through the Cache object collection.

Community Additions

© 2015 Microsoft