Add dependency to the cache item.

Namespace: Alachisoft.NCache.Web.Caching
Assembly: Alachisoft.NCache.Web (in Alachisoft.NCache.Web.dll) Version: 4.1.0.0 (4.1.0.0)

Syntax

C#
public virtual bool AddDependency(
	string key,
	CacheDependency dependency,
	bool isResyncRequired
)
Visual Basic
Public Overridable Function AddDependency ( _
	key As String, _
	dependency As CacheDependency, _
	isResyncRequired As Boolean _
) As Boolean
Visual C++
public:
virtual bool AddDependency(
	String^ key, 
	CacheDependency^ dependency, 
	bool isResyncRequired
)

Parameters

key
Type: System..::..String
key used to reference the required object
dependency
Type: Alachisoft.NCache.Runtime.Dependencies..::..CacheDependency
CacheDependency to be added
isResyncRequired
Type: System..::..Boolean
If set, then at the time of expiration, a fresh copy of the item is fetched from the master datasource provided that the read-thru is enabled. Otherwise it is expired as normal.

Return Value

True if the operation successeded otherwise false

See Also