批量删除ASP.NET中的缓存(cache)

        IDictionaryEnumerator em = HttpContext.Current.Cache.GetEnumerator();

        while (em.MoveNext())
        {
            if (需要删除的条件)
            {
                HttpContext.Current.Cache.Remove(em.Key.ToString());
            }
        }

posted @ 2013-10-09 11:17  越天  阅读(260)  评论(0编辑  收藏  举报