string cacheKey =
"key";
List<string> list= new
List<string>();
Object obj =
HttpRuntime.Cache[cacheKey];
if (obj ==
null)
{
list= 数据库取数据;
HttpRuntime.Cache.Add(cacheKey, list, null, DateTime.Now.AddMinutes(60),
Cache.NoSlidingExpiration, CacheItemPriority.Normal,
null);
}
原文:http://www.cnblogs.com/Ilin631/p/3522094.html