c# framework 缓存依赖

 

  缓存依赖关联文本文件

HashSet<string> uset = new HashSet<string>();
//添加缓存依赖
System.Web.Caching.CacheDependency cdy = new System.Web.Caching.CacheDependency(baseUrl + @"ConfigBlackList.txt");
//添加缓存项
HttpRuntime.Cache.Insert(
        "BlackList",
        uset,
        cdy,
        DateTime.MaxValue,
        System.Web.Caching.Cache.NoSlidingExpiration
       );

  

原文地址:https://www.cnblogs.com/yinzhou/p/11277361.html