DataCache.Remove Method (String, DataCacheItemVersion, String)

 

Removes an object with a specific version from the cache in a region. This overload is not supported in Windows Azure Shared Caching.

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

Syntax

public bool Remove(
    string key,
    DataCacheItemVersion version,
    string region
)
public:
bool Remove(
    String^ key,
    DataCacheItemVersion^ version,
    String^ region
)
member Remove : 
        key:string *
        version:DataCacheItemVersion *
        region:string -> bool
Public Function Remove (
    key As String,
    version As DataCacheItemVersion,
    region As String
) As Boolean

Parameters

  • key
    Type: System.String

    The unique value that is used to identify the object in the region.

  • region
    Type: System.String

    The name of the region the object resides in.

Return Value

Type: System.Boolean

True if the object is removed; otherwise, false.

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.

See Also

Remove Overload
DataCache Class
Microsoft.ApplicationServer.Caching Namespace

Return to top