CacheDependency 的使用方法

            //创建缓存依赖项
            CacheDependency dep = new CacheDependency(fileName);
            //创建缓存
            HttpContext.Current.Cache.Insert(key, obj, dep);

获取CacheDependency 的方法

            if (string.IsNullOrEmpty(key))
            {
                return null;
            }
            return HttpContext.Current.Cache.Get(key);
原文地址:https://www.cnblogs.com/william-lin/p/3254612.html