Property SyncDependency
SyncDependency
Synchronizes two separate caches so that an item updated or removed from one cache can have the same effect on the synchronized cache. For cache sync dependency, an item must exist in cache before another item can be added with a dependency on it. This property lets you set the cache sync dependency with a cache item.
Declaration
public CacheSyncDependency SyncDependency { get; set; }
Property Value
Type | Description |
---|---|
CacheSyncDependency | This property keeps the items present in one cache synchronized with the items present in another cache. |
Examples
The following example sets a CacheSyncDependency dependency of a CacheItem.
Product product = new Product();
product.Id = 1;
product.Name = "Chai";
CacheItem item = new CacheItem(product);
item.SyncDependency = new CacheSyncDependency("partitionedCache", "Product0");