Language

Cache.Remove Method (String, CacheItemVersion)

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

Removes a cached object from the cache. This overload supports optimistic concurrency by accepting a CacheItemVersion object.

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

Syntax

'Declaration
Public Sub Remove ( _
    key As String, _
    version As CacheItemVersion _
)
'Usage
Dim instance As Cache
Dim key As String
Dim version As CacheItemVersion

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

Parameters

  • key
    The name of the region. Use DefaultRegion if the object is not stored in a region.
  • version
    The unique value that is used to identify the object in the cache. If this parameter is null, an exception is thrown.

Remarks

This method supports optimistic concurrency by only removing the object having the CacheItemVersion value specified by the version parameter. If another process updates this object before this 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

Cache Class
Cache Members
System.Data.Caching Namespace