Language

Cache.Get Method (String, ref CacheItemVersion)

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

Gets an object from cache using the specified key. You may also provide the version to get the specific version of a key, if that version is still the most current in the cache.

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

Syntax

'Declaration
Public Function Get ( _
    key As String, _
    ByRef version As CacheItemVersion _
) As Object
'Usage
Dim instance As Cache
Dim key As String
Dim version As CacheItemVersion
Dim returnValue As Object

returnValue = instance.Get(key, version)
public Object Get (
    string key,
    ref CacheItemVersion version
)
public:
Object^ Get (
    String^ key, 
    CacheItemVersion^% version
)
public Object Get (
    String key, 
    /** @ref */ CacheItemVersion version
)
JScript does not support passing value-type arguments by reference.

Parameters

  • key
    The unique value that is used to identify the object in the cache.
  • version
    Version of the object to retrieve. If null, the version of the object is retrieved.

Return Value

The object that was cached by using the specified key. Null is returned if the key does not exist, or no longer exists at the version specified.

Remarks

For more information about this method, see How to: Get an Object from Cache (Velocity).

See Also

Reference

Cache Class
Cache Members
System.Data.Caching Namespace