Asp.net清除数据缓存及页面缓存

    //清除所有数据缓存
    IDictionaryEnumerator CacheEnum = Cache.GetEnumerator();
    while (CacheEnum.MoveNext())
    {
      Cache.Remove(CacheEnum.Entry.Key.ToString());
    }
   //清除指定的数据缓存

HttpRuntime.Cache.Remove(cacheEnmu.Key.ToString());
   

   //清除指定的页面缓存(注:在同一浏览器下要刷新一下)

   string PagePath = "/Default.aspx";
   HttpResponse.RemoveOutputCacheItem(PagePath);

原文地址:https://www.cnblogs.com/chixiaojin/p/2215856.html