public class CacheHelper
{
///
/// 获取缓存中的数据
///
///
///
public static object Get(string key)
{
System.Web.Caching.Cache cache = HttpRuntime.Cache;
return cache[key];
}
///
/// 添加
///
///
///
public static void Set(string key,object value)
{
System.Web.Caching.Cache cache = HttpRuntime.Cache;
cache[key] = value;
}
///
/// 移除
///
///
public static void Remove(string key)
{
System.Web.Caching.Cache cache = HttpRuntime.Cache;
cache.Remove(key);
}
}