本地緩存

 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);
            }數據庫

相關文章
相關標籤/搜索