本地缓存

时间:2014-01-16 23:35:07   收藏:0   阅读:336

 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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!