ObjectCache.Item[String] ObjectCache.Item[String] ObjectCache.Item[String] ObjectCache.Item[String] Property

定义

获取或设置 ObjectCache 类的默认索引器。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 String String String

缓存中的缓存项的唯一标识符。A unique identifier for a cache entry in the cache.

属性值

用作该缓存实例的索引器的键。A key that serves as an indexer into the cache instance.

注解

此属性的 set 访问器的行为就像Set(String, Object, DateTimeOffset, String)方法。The behavior of the set accessor of this property is like the Set(String, Object, DateTimeOffset, String) method. 在内部,缓存实现可以设置到指定的值的绝对过期InfiniteAbsoluteExpiration方法。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.

Get 访问器的行为就像调用Get(String)方法,并使用null区域名称。The behavior of get accessor is like calling the Get(String) method and using null for the region name.

适用于