Asp.Net缓存Cache的使用
添加Cache
1 HttpRuntime.Cache.Add(CacheKey, pathList, null, DateTime.Now.AddMinutes(10), TimeSpan.Zero, System.Web.Caching.CacheItemPriority.Default, null);
删除Cache
1 HttpRuntime.Cache.Remove(CacheKey);
判断Cache是否存在
1 if (HttpRuntime.Cache[CacheKey]!=null) 2 {3 }
获取Cache
1 List<string> pathList = (List<string>)HttpRuntime.Cache.Get(CacheKey);