Exemplo n.º 1
0
        /// <summary>
        /// 获取团购分类
        /// </summary>
        /// <returns></returns>
        public static List <GroupBuyingCategoryInfo> GetGroupBuyingCategory()
        {
            string cacheKey = CommonFacade.GenerateKey("GroupBuying_GetGroupBuyingCategory");

            if (HttpRuntime.Cache[cacheKey] != null)
            {
                return((List <GroupBuyingCategoryInfo>)HttpRuntime.Cache[cacheKey]);
            }

            List <GroupBuyingCategoryInfo> result = GroupBuyingDA.GetGroupBuyingCategory();

            HttpRuntime.Cache.Insert(cacheKey, result, null, DateTime.Now.AddSeconds(CacheTime.Longest), Cache.NoSlidingExpiration);

            return(result);
        }