ObjectCache.Item[String] Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the default indexer for the ObjectCache class.
public:
abstract property System::Object ^ default[System::String ^] { System::Object ^ get(System::String ^ key); void set(System::String ^ key, System::Object ^ value); };
public abstract object this[string key] { get; set; }
member this.Item(string) : obj with get, set
Default Public MustOverride Property Item(key As String) As Object
- key
- String
A unique identifier for a cache entry in the cache.
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.
Product | Versions |
---|---|
.NET | 8 (package-provided), 9 (package-provided), 10 (package-provided) |
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 (package-provided) |
.NET feedback
.NET is an open source project. Select a link to provide feedback: