Frequently Asked Interview Questions

How can you implement File and Cache Item Dependency?

How can you implement File and Cache Item Dependency?

Cache item can be dependent on a particular file. On modification of this file, cache will be invalidated.

// Create a dependency for the ProductList.xml file.
CacheDependency prodDependency = new CacheDependency(Server.MapPath("ProductList.xml"));
// Add a cache item that will be dependent on this file.
Cache.Insert("ProductInfo", prodInfo, prodDependency);


Caching FAQSASP.NET Caching Article


Most Visited Pages

Home | Site Index | Contact Us