DataCacheAdd Method (String, Object, IEnumerableDataCacheTag)Windows Server AppFabric Caching Compatibility Library
Inserts an object to the cache with a specified list of tags.

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 Add(
	string key,
	Object value,
	IEnumerable<DataCacheTag> tags
)

Parameters

key
Type: SystemString
The unique identifier used to access the object in the cache.
value
Type: SystemObject
The object to add to the cache.
tags
Type: System.Collections.GenericIEnumerableDataCacheTag
List of DataCacheTag objects associated with the cached object.

Return Value

Type: DataCacheItemVersion
The DataCacheItemVersion object that represents the version of the object added to the cache using the provided key value.
Exceptions

ExceptionCondition
DataCacheExceptionThrown if the object already exists in the cache.
Remarks

If an item using the same key is already present in the cache, this call throws an exception of type DataCacheException with the ErrorCode being set to KeyAlreadyExists. Tags may only be used to retrieve a cached object if that object is stored in a region. This overload does not save the object to a region and tags can simply be used as object's metadata.
See Also

Reference