try
{
IDictionaryEnumerator DicCache = HttpRuntime.Cache.GetEnumerator(); int count = HttpRuntime.Cache.Count; for (int i = 0; i < count; i++)
{
DicCache.MoveNext();
HttpRuntime.Cache.Remove(DicCache.Entry.Key.ToString());
}
} catch (Exception)
{ throw;
}
1 回答

炎炎设计
TA贡献1808条经验 获得超4个赞
试试下面的代码
try{ IDictionaryEnumerator DicCache = HttpRuntime.Cache.GetEnumerator(); while(DicCache.MoveNext()) { HttpRuntime.Cache.Remove(DicCache.Entry.Key.ToString()); } }catch (Exception) { throw; }
- 1 回答
- 0 关注
- 429 浏览
添加回答
举报
0/150
提交
取消