System.Web 1.0.5000.0 2.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Object System.Collections.IEnumerable

One instance of this class is created per application domain, and it remains valid as long as the application domain remains active. Information about an instance of this class is available through the Cache property of the object or the Cache property of the object.

The class is not intended for use outside of ASP.NET applications. It was designed and tested for use in ASP.NET to provide caching for Web applications. For other types of applications, such as console applications or Windows Forms applications, use the class.

Implements the cache for a Web application. This class cannot be inherited.

- Constructor
  To be added

  Initializes a new instance of the class.

  1.0.5000.0
  2.0.0.0
- Method
  System.Object `` `` `` `` `` `` ``

  Calls to this method will fail if an item with the same parameter is already stored in the Cache. To overwrite an existing Cache item using the same parameter, use the method.

  You cannot set both the and parameters. If you intend the cache item to expire at a specific time, you set the parameter to the specific time, and the parameter to .

  If you intend the cache item to expire after a certain amount of time has passed since the item was last accessed, you set the parameter to the expiration interval, and the parameter to .

  Adds the specified item to the 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.

  An object that represents the item that was added if the item was previously stored in the cache; otherwise, null.

  The cache key used to reference the item. The item to be added to the cache. The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this parameter contains null. The time at which the added object expires and is removed from the cache. If you are using sliding expiration, the parameter must be . The interval between the time the added object was last accessed and the time at which that object expires. If this value is the equivalent of 20 minutes, the object expires and is removed from the cache 20 minutes after it is last accessed. If you are using absolute expiration, the parameter must be . The relative cost of the object, as expressed by the enumeration. The cache uses this value when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost. A delegate that, if provided, is called when an object is removed from the cache. You can use this to notify applications when their objects are deleted from the cache. 1.0.5000.0 2.0.0.0
- Property
  System.Int32 To be added: an object of type 'int'

  This property can be useful when monitoring your application's performance or when using ASP.NET tracing functionality.

  Gets the number of items stored in the cache.

  1.0.5000.0
  2.0.0.0
- Method
  System.Object `` To be added

  Retrieves the specified item from the object.

  The retrieved cache item, or null if the key is not found.

  The identifier for the cache item to retrieve. 1.0.5000.0 2.0.0.0
- Method
  System.Collections.IDictionaryEnumerator

  Items can be added to or removed from the cache while this method is enumerating through the items.

  Retrieves a dictionary enumerator used to iterate through the key settings and their values contained in the cache.

  An enumerator to iterate through the object.

  1.0.5000.0
  2.0.0.0
- Method
  System.Void `` ``

  This method will overwrite an existing cache item whose key matches the parameter. The object added to the cache using this overload of the Insert method is inserted with no file or cache dependencies, a priority of , a sliding expiration value of , and an absolute expiration value of .

  Inserts an item into the object with a cache key to reference its location, using default values provided by the enumeration.

  The cache key used to reference the item. The object to be inserted into the cache. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` ``

  This method will overwrite an existing cache item whose key matches the parameter. The object added to the cache using this overload of the Insert method is inserted with no file or cache dependencies, a priority of , a sliding expiration value of , and an absolute expiration value of .

  Inserts an object into the that has file or key dependencies.

  The cache key used to identify the item. The object to be inserted in the cache. The file or cache key dependencies for the inserted object. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this parameter contains null. 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` `` ``

  This method will overwrite an existing Cache item with the same parameter.

  If the parameter is set to , sliding expiration is disabled. If you set the parameter to greater than , the parameter is set to plus the value contained in the parameter. If the item is requested from the cache before the amount of time specified by the parameter, the item will be placed in the cache again, and will again be set to DateTime.Now plus the value contained in the parameter. If the item is not requested from the cache before the date in the parameter, the item is removed from the cache. . The item added to the cache using this overload of the insert method is inserted with a priority of .

  Inserts an object into the with dependencies and expiration policies.

  The cache key used to reference the object. The object to be inserted in the cache. The file or cache key dependencies for the inserted object. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this parameter contains null. The time at which the inserted object expires and is removed from the cache. To avoid possible issues with local time such as changes from standard time to daylight saving time, use rather than for this parameter value. If you are using absolute expiration, the parameter must be . The interval between the time the inserted object is last accessed and the time at which that object expires. If this value is the equivalent of 20 minutes, the object will expire and be removed from the cache 20 minutes after it was last accessed. If you are using sliding expiration, the parameter must be . 1.0.5000.0 2.0.0.0
- Method
  System.Void `` `` `` `` `` `` ``

  This method will overwrite an existing Cache item with the same parameter.

  You cannot set both the and parameters. If you intend the cache item to expire at a specific time, you set the parameter to the specific time, and the parameter to .

  If you intend the cache item to expire after a certain amount of time has passed since the last access to the item, you set the parameter to the expiration interval, and the parameter to .

  Inserts an object into the 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.

  The cache key used to reference the object. The object to be inserted in the cache. The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this parameter contains null. The time at which the inserted object expires and is removed from the cache. To avoid possible issues with local time such as changes from standard time to daylight saving time, use rather than for this parameter value. If you are using absolute expiration, the parameter must be . The interval between the time the inserted object was last accessed and the time at which that object expires. If this value is the equivalent of 20 minutes, the object will expire and be removed from the cache 20 minutes after it was last accessed. If you are using sliding expiration, the parameter must be . The cost of the object relative to other items stored in the cache, as expressed by the enumeration. This value is used by the cache when it evicts objects; objects with a lower cost are removed from the cache before objects with a higher cost. A delegate that, if provided, will be called when an object is removed from the cache. You can use this to notify applications when their objects are deleted from the cache. 1.0.5000.0 2.0.0.0
- Property
  System.Object `` To be added: an object of type 'string' To be added To be added: an object of type 'object' To be added 1.0.5000.0 2.0.0.0
- Field
  System.DateTime

  When used, this field sets the parameter equal to , which is a constant representing the largest possible DateTime value, 12/31/9999 11:59:59 PM.

  Used in the parameter in an method call to indicate the item should never expire. This field is read-only.

  1.0.5000.0
  2.0.0.0
  12/31/9999 11:59:59 PM
- Field
  System.TimeSpan

  When used, this field sets the parameter to the field, which has a constant value of zero. The cached item expires in accordance with the parameter associated with the Insert or Add method call.

  Used as the parameter in an or method call to disable sliding expirations. This field is read-only.

  1.0.5000.0
  2.0.0.0
- Method
  System.Object `` To be added

  Removes the specified item from the application's object.

  The item removed from the Cache. If the value in the key parameter is not found, returns null.

  A identifier for the cache item to remove. 1.0.5000.0 2.0.0.0
- Method
  1.0.5000.0
  2.0.0.0
  System.Collections.IEnumerator To be added.

  Returns an enumerator that can iterate through the object collection.

  An enumerator that can iterate through the object collection.