• Webinars
  • Docs
  • Download
  • Blogs
  • Contact Us
Try Free
Show / Hide Table of Contents

Property Dependency

Dependency

The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, the value is null for this
property.

Declaration
public CacheDependency Dependency { get; set; }
Property Value
Type Description
CacheDependency

The file or cache key dependencies for the item.

Examples

Example sets key dependency of a cache item

Product product = new Product();
product.Id = 1;
product.Name = "Chai";

CacheItem item = new CacheItem(product);

item.Dependency = new KeyDependency("Product1");
Back to top Copyright © 2017 Alachisoft