Represents an individual cache entry in the cache.
Assembly: System.Runtime.Caching (in System.Runtime.Caching.dll)
Thetype exposes the following members.
|CacheItem(String)||Initializes a new instance using the specified key of a cache entry.|
|CacheItem(String, Object)||Initializes a new instance using the specified key and a value of the cache entry.|
|CacheItem(String, Object, String)||Initializes a new instance using the specified key, value, and region of the cache entry.|
|Equals(Object)||Determines whether the specified object is equal to the current object. (Inherited from Object.)|
|GetHashCode||Serves as the default hash function. (Inherited from Object.)|
|GetType||Gets the Type of the current instance. (Inherited from Object.)|
|MemberwiseClone||Creates a shallow copy of the current Object. (Inherited from Object.)|
|ToString||Returns a string that represents the current object. (Inherited from Object.)|
The class provides a logical representation of a cache entry, which can include regions by using the RegionName property. In the default ASP.NET cache implementation, a cache entry is a key/value pair.
Entries in the cache are not instances. Instead, the cache provider can store cache entries in any internal format that is convenient. However, the cache API requires cache providers to be able to convert cache entries into instances (and vice versa).
Custom cache implementations can inherit from the class provide additional information about cache entries.Notes to Implementers
The ObjectCache class has methods that support adding, fetching, and updating cache data, and all these methods have overloads that support the class. Therefore, a custom cache implementation can create an extended class and use that extended class together with the existing ObjectCache API for cache entries.