Specifies the reason an item was removed from the Cache.
Assembly: System.Web (in System.Web.dll)
The item is removed from the cache because the cache dependency associated with it changed.
The item is removed from the cache because it expired.
The item is removed from the cache because the system removed it to free memory.
Legacy Code Example
The following code example demonstrates a shared Boolean property, itemRemoved, a shared enumeration object, reason, and a CacheItemRemovedCallback delegate, onRemove. The latter can be included in an Insert or Add method call. It also defines a method, RemovedCallback, with a signature that matches the CacheItemRemovedCallback delegate. When the RemovedCallback method is called, it changes the itemRemoved property value to true and assigns the reason property value to the reason provided by the enumeration.Code snippet is not found. Confirm that the code snippet name 'System.Web.Caching Examples' is correct.
Available since 1.1