<!-- 根据主键批量删除 --> <delete id="deleteByKeys"> DELETE FROM product WHERE id in <foreach collection="list" separator="," item="id" open="(" close=")"> #{id} </foreach> </d
IDictionaryEnumerator em = HttpContext.Current.Cache.GetEnumerator(); while (em.MoveNext()) { if (需要删除的条件) { HttpContext.Current.Cache.Remove(em.Key.ToString()); } }