“ 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)
{}