日期:2014-05-17 浏览次数:20469 次
/// <summary>
/// 获取所有缓存对象的key
/// </summary>
/// <returns>返回一个IList对象</returns>
public static IList<string> GetKeys()
{
List<string> keys = new List<string>();
IDictionaryEnumerator cacheItem =HttpRuntime.Cache.GetEnumerator();
while (cacheItem.MoveNext())
{
keys.Add(cacheItem.Key.ToString());
}
return keys.AsReadOnly();
}
------解决方案--------------------
http://www.cnblogs.com/wenanry/archive/2008/08/13/1267028.html