Language

Cache.GetCacheItem Method (String, String)

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

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

Namespace: System.Data.Caching
Assembly: ClientLibrary (in clientlibrary.dll)

Syntax

'Declaration
Public Function GetCacheItem ( _
    region As String, _
    key As String _
) As CacheItem
'Usage
Dim instance As Cache
Dim region As String
Dim key As String
Dim returnValue As CacheItem

returnValue = instance.GetCacheItem(region, key)
public CacheItem GetCacheItem (
    string region,
    string key
)
public:
CacheItem^ GetCacheItem (
    String^ region, 
    String^ key
)
public CacheItem GetCacheItem (
    String region, 
    String key
)
public function GetCacheItem (
    region : String, 
    key : String
) : CacheItem

Parameters

  • region
    The name of the region. Use DefaultRegion if the object is not stored in a region.
  • key
    A unique value that is used to identify the object in the region or cache.

Return Value

A CacheItem object that contains all information associated with the cached object. Null is returned if the key does not exist.

Remarks

A CacheItem 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 the cached object. For more information about tag-based operations, see Tag-Based Methods (Velocity). For more information about concurrency, see Concurrency Models (Velocity) and Concurrency Methods (Velocity).

See Also

Reference

Cache Class
Cache Members
System.Data.Caching Namespace