NamedCacheRemoveAsync Method

ScaleOut Software NamedCache API
Asynchronously removes the object with the given id from the cache. No exception will be thrown and no action will be taken if the specified object does not exist in the cache.

Namespace:  Soss.Client
Assembly:  soss_namedcache (in soss_namedcache.dll) Version:

public Task RemoveAsync(
	CachedObjectId id,
	IOptimisticConcurrencyVersionHolder versionedObject = null,
	LockTicket lockTicket = null,
	CancellationToken cancellationToken = null


Type: Soss.ClientCachedObjectId
Object identifier.
versionedObject (Optional)
Type: Soss.ClientIOptimisticConcurrencyVersionHolder
if specified, the optimistic concurrency version held by versionedObject will be compared with the current object version held by the cache. The object will be deleted if and only if the versions match.
lockTicket (Optional)
Type: Soss.ClientLockTicket
An optional LockTicket obtained from a previous locking call. If lockTicket is specified, the object will be removed only if the object is currently locked with the given lockTicket. If both versionedObject and lockTicket are specified, versionedObject is ignored.
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
An optional CancellationToken that can be used to cancel the asynchronous operation.

Return Value

Type: Task
an awaitable Task

ArgumentNullExceptionif id is null
InvalidOperationExceptionIf an unexpected return code is returned when removing the object from store.
See Also