NamedCachePutAsync Method

ScaleOut Software NamedCache API
Asynchronously creates or updates a serializable object within a named cache.

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

public Task<AsyncPutResult> PutAsync(
	CachedObjectId id,
	Object obj,
	CreatePolicy createPolicy,
	PutOptions putOptions,
	LockTicket lockTicket = null,
	CancellationToken cancellationToken = null


Type: Soss.ClientCachedObjectId
Object identifier.
Type: SystemObject
Serializable object to store in the cache. The argument cannot be null.
Type: Soss.ClientCreatePolicy
A CreatePolicy instance containing extended cache policy information for the object. In this method, if the optional createPolicy parameter is null and neither ObjectMustExist nor ObjectMustNotExist bits are set for the putOptions parameter, then DefaultCreatePolicy is used instead. When createPolicy parameter is null and the ObjectMustNotExist bit is set for the putOptions parameter is thrown.
Type: PutOptions
PutOptions flags governing various locking and object existence requirements
lockTicket (Optional)
Type: Soss.ClientLockTicket
An optional LockTicket obtained from a previous locking call
cancellationToken (Optional)
Type: System.ThreadingCancellationToken
An optional CancellationToken that can be used to cancel the asynchronous operation.

Return Value

Type: TaskAsyncPutResult
a Task-wrapped AsyncPutResult which returns an indication as to whether the object was created or updated and any lockTicket resulting from a lock operation.

ArgumentNullException when id or createPolicy is null.
See Also