Share via


DataCacheItem.Key Property

[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]

The identifier that is used to distinguish the cached object in the cache or region.

Namespace: Microsoft.Data.Caching
Assembly: CacheBaseLibrary (in cachebaselibrary.dll)

Syntax

'Declaration
Public ReadOnly Property Key As String
'Usage
Dim instance As DataCacheItem
Dim value As String

value = instance.Key
public string Key { get; }
public:
property String^ Key {
    String^ get ();
}
/** @property */
public String get_Key ()
public function get Key () : String

Property Value

A string value that represents the identifier that is used to distinguish the cached object in the cache or region.

Remarks

For objects stored in regions, the Key is only unique relative to other objects in that particular region. For objects not stored in regions, the Key is only unique relative to other objects not stored in regions in the same cache. The same Key can exist more than once in a cache if the additional keys are stored within different regions.

The DataCacheItem class is especially useful for updating tags associated with the object and concurrency operations. For more information, see Tag-Based Methods (Velocity) and Concurrency Methods (Velocity).

See Also

Reference

DataCacheItem Class
DataCacheItem Members
Microsoft.Data.Caching Namespace