Share via


DataCacheItem.Key Property

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

Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Core (in microsoft.applicationserver.caching.core.dll)

Usage

'Usage
Dim instance As DataCacheItem
Dim value As String

value = instance.Key

Syntax

'Declaration
Public ReadOnly Property Key As String
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).

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Visual Studio 2010 and later, .NET Framework 4

Target Platforms

Windows 7; Windows Server 2008 R2; Windows Server 2008 Service Pack 2; Windows Vista Service Pack 2

See Also

Reference

DataCacheItem Class
DataCacheItem Members
Microsoft.ApplicationServer.Caching Namespace

  ff425062(v=azure.10).md 2011-08-26