DataCache.GetCacheItem Method (String, String)
Gets a DataCacheItem object to retrieve all information associated with your cached object in the cluster. For objects stored in regions.
Namespace: Microsoft.ApplicationServer.Caching
Assembly: Microsoft.ApplicationServer.Caching.Client (in microsoft.applicationserver.caching.client.dll)
Usage
'Usage
Dim instance As DataCache
Dim key As String
Dim region As String
Dim returnValue As DataCacheItem
returnValue = instance.GetCacheItem(key, region)
Syntax
'Declaration
Public Function GetCacheItem ( _
key As String, _
region As String _
) As DataCacheItem
public DataCacheItem GetCacheItem (
string key,
string region
)
public:
DataCacheItem^ GetCacheItem (
String^ key,
String^ region
)
public DataCacheItem GetCacheItem (
String key,
String region
)
public function GetCacheItem (
key : String,
region : String
) : DataCacheItem
Parameters
- key
The unique value that is used to identify the object in the region.
- region
The name of the region where the object resides.
Return Value
A DataCacheItem object that contains all information associated with your cached object. Null is returned if the key does not exist.
Remarks
A DataCacheItem object is useful for tag-based and concurrency operations because, together with other information, it includes the associated tags and current version information corresponding to your cached object. For more information about tag-based operations, see Tag-Based Methods. For more information about concurrency, see Concurrency Models and Concurrency Methods.
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
DataCache Class
DataCache Members
Microsoft.ApplicationServer.Caching Namespace
ff425062(v=azure.10).md 2011-08-26