This documentation is archived and is not being maintained.

ObjectCache::Item Property

Gets or sets the default indexer for the ObjectCache class.

Namespace:  System.Runtime.Caching
Assembly:  System.Runtime.Caching (in System.Runtime.Caching.dll)

public:
virtual property Object^ Item[String^ key] {
	Object^ get (String^ key) abstract;
	void set (String^ key, Object^ value) abstract;
}

Parameters

key
Type: System::String
A unique identifier for a cache entry in the cache.

Property Value

Type: System::Object
A key that serves as an indexer into the cache instance.

The behavior of the set accessor of this property is like the Set(String, Object, DateTimeOffset, String) method. Internally, a cache implementation could set the absolute expiration of the specified value to the InfiniteAbsoluteExpiration method. However this behavior is ultimately up to the cache implementation.

The behavior of get accessor is like calling the Get(String) method and using nullptr for the region name.

.NET Framework

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Show: