ObjectCache.Item Property (String)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the default indexer for the ObjectCache class.

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

public abstract object this[
	string key
] { get; set; }

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 null for the region name.

.NET Framework
Available since 4.0
Return to top
Show: