“ CacheManager”和OutputCache有什么区别?

时间:2018-12-03 08:14:03

标签: c# outputcache cachemanager

“ CacheManager”和OutputCache有什么区别?

public IList<ContentItem> GetHotelPagingAttr(int currRecord, int pageSize, string moduleIds, string orderby,string star)
    {
        return CacheManager.CacheProvider.GetCache().GetOrCall<IList<ContentItem>>(
                cacheKey: String.Format("GetTourPagingAttr"),
                function: () =>
                {
                    return _webContent.GetHotelPagingAttr(currRecord, pageSize, moduleIds, orderby, star);
                });
    }

[OutputCache(Duration = 604800, Location = OutputCacheLocation.ServerAndClient)]
        public ActionResult ResizeImage(string originalFileLocation, int maxWidth, int maxHeight)
        {}

0 个答案:

没有答案