A client application can have more than one cache instances initialized. CacheSyncDependency keeps the items present in one cache synchronized with the items present in another cache.

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

Syntax

C#
[SerializableAttribute]
public class CacheSyncDependency : ICompactSerializable
Visual Basic
<SerializableAttribute>
Public Class CacheSyncDependency
	Implements ICompactSerializable
Visual C++
[SerializableAttribute]
public ref class CacheSyncDependency : ICompactSerializable

Remarks

You can add items with CacheSyncDependency to your application's cache with the Add(String, Object) and Insert(String, Object, NamedTagsDictionary) methods.

When you add an item to an application's Cache object with CacheSyncDependency, it monitors the remote cache (the cache you want your local cache to be synchronized with) for changes. As soon as an item is updated in or removed from the remote cache this change is automatically updated in the local cache if the CacheSyncDependency was provided with the cache items. This helps you keep your local cache synchronized with the remote cache all the time.

Inheritance Hierarchy

System..::..Object
  Alachisoft.NCache.Web.Caching..::..CacheSyncDependency

See Also