DataCachePutAndUnlock Method (String, Object, DataCacheLockHandle, TimeSpan, String)Windows Server AppFabric Caching Compatibility Library
Replaces and unlocks an object in the specified region.

Namespace: Soss.Compat.WSAF
Assembly: soss_wsaf_compat (in soss_wsaf_compat.dll) Version: 1.1.0.100 (1.1.0.100)
Syntax

public DataCacheItemVersion PutAndUnlock(
	string key,
	Object value,
	DataCacheLockHandle lockHandle,
	TimeSpan timeout,
	string region
)

Parameters

key
Type: SystemString
The unique identifier used to access the object in the cache.
value
Type: SystemObject
The object to add or replace in the cache.
lockHandle
Type: Soss.Compat.WSAFDataCacheLockHandle
The DataCacheLockHandle lock ticket that was obtained when the object was locked.
timeout
Type: SystemTimeSpan
A non-zero value used to indicate how much time the object should reside in the cache before it is expired. The timeout parameter is ignored if object already exists.
region
Type: SystemString
The name of the region where the object will be stored.

Return Value

Type: DataCacheItemVersion
The DataCacheItemVersion object representing the version of the object after the Put operation completes.
Remarks

If the lockHandle parameter is not equal to the DataCacheLockHandle object obtained from the method that is used to lock the object, a DataCacheException object is thrown with the ErrorCode property set to InvalidCacheLockHandle, and the object is not updated.

See Also

Reference