本地缓存

 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);
            }

posted on 2014-01-16 10:47  Ilin  阅读(160)  评论(0编辑  收藏  举报