コード例 #1
0
ファイル: StoreFacade.cs プロジェクト: sanlonezhang/ql
        /// <summary>
        /// 所有的有效的二级域名商家
        /// </summary>
        /// <returns></returns>
        public static List <StoreDomainPage> GetAllStoreDomainHomePageList()
        {
            string cacheKey = CommonFacade.GenerateKey("GetAllStoreDomainHomePageList");

            if (HttpRuntime.Cache[cacheKey] != null)
            {
                return((List <StoreDomainPage>)HttpRuntime.Cache[cacheKey]);
            }
            List <StoreDomainPage> result = StoreDA.GetAllStoreDomainHomePageList();

            if (result != null)
            {
                HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Middle), Cache.NoSlidingExpiration);
            }
            return(result);
        }