GetCacheItem Method (String)

Gets a DataCacheItem object to retrieve all information associated with your cached object in the cluster.

Namespace:  Microsoft.ApplicationServer.Caching
Assembly:  Microsoft.ApplicationServer.Caching.Client (in Microsoft.ApplicationServer.Caching.Client.dll)

public DataCacheItem GetCacheItem(
	string key
)

Parameters

key
Type: System..::..String
The unique value that is used to identify the object in the cache.

Return Value

Type: Microsoft.ApplicationServer.Caching..::..DataCacheItem
ADataCacheItem object that contains all information associated with your cached object. Null is returned if the key does not exist.

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 <maml:externalLink><maml:linkText>Tag-Based Methods</maml:linkText><maml:linkUri>http://go.microsoft.com/fwlink/?LinkId=214985</maml:linkUri></maml:externalLink>. For more information about concurrency, see <maml:externalLink><maml:linkText>Concurrency Models</maml:linkText><maml:linkUri>http://go.microsoft.com/fwlink/?LinkId=214984</maml:linkUri></maml:externalLink>.

Show: