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: 6.2.0.0
Syntax
public Task RemoveAsync( CachedObjectId id, IOptimisticConcurrencyVersionHolder versionedObject = null, LockTicket lockTicket = null, CancellationToken cancellationToken = null )
Parameters
- id
- Type: Soss.Client.CachedObjectId
Object identifier. - versionedObject (Optional)
- Type: Soss.Client.IOptimisticConcurrencyVersionHolder
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.Client.LockTicket
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.Threading.CancellationToken
An optional CancellationToken that can be used to cancel the asynchronous operation.
Return Value
Type: Taskan awaitable Task
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | if id is null |
InvalidOperationException | If an unexpected return code is returned when removing the object from store. |
See Also