DataCache.Remove Method (String, DataCacheItemVersion, String)

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

Removes an object from the specified region if it is at the specified version.

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

Syntax

'Declaration
Public Sub Remove ( _
    key As String, _
    version As DataCacheItemVersion, _
    region As String _
)
'Usage
Dim instance As DataCache
Dim key As String
Dim version As DataCacheItemVersion
Dim region As String

instance.Remove(key, version, region)
public void Remove (
    string key,
    DataCacheItemVersion version,
    string region
)
public:
void Remove (
    String^ key, 
    DataCacheItemVersion^ version, 
    String^ region
)
public void Remove (
    String key, 
    DataCacheItemVersion version, 
    String region
)
public function Remove (
    key : String, 
    version : DataCacheItemVersion, 
    region : String
)

Parameters

  • key
    The unique value that is used to identify the object in the region.
  • version
    The DataCacheItemVersion object that represents the version of the cached object that is to be removed.
  • region
    The name of the region the object resides in.

Remarks

This method supports optimistic concurrency by only removing the object having the DataCacheItemVersion value specified with the version parameter. If another process updates this object before the method call, the object is not removed. For more information about how to use this method, see How to: Remove an Object from Cache (Velocity).

See Also

Reference

DataCache Class
DataCache Members
Microsoft.Data.Caching Namespace