本文整理匯總了C#中System.Web.Caching.CacheDependency類的典型用法代碼示例。如果您正苦於以下問題:C# CacheDependency類的具體用法?C# CacheDependency怎麽用?C# CacheDependency使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
CacheDependency類屬於System.Web.Caching命名空間,在下文中一共展示了CacheDependency類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CacheDependency
// Insert the cache item.
CacheDependency dep = new CacheDependency(fileName, dt);
cache.Insert("key", "value", dep);
// Check whether CacheDependency.HasChanged is true.
if (dep.HasChanged)
Response.Write("<p>The dependency has changed.");
else Response.Write("<p>The dependency has not changed.");