asp.net mvc2.0升级到asp.net mvc4.0用户控件中参数缓存变化

广告:阿里云新人专场

[OutputCache(Duration = 2000, VaryByParam = "none",VaryByCustom = "Crawler")]
改为 [OutputCache(Duration = 2000, VaryByParam = "id;nowname",VaryByCustom = "Crawler")]

如: [OutputCache(Duration = 9526, VaryByParam = "classid;parentid;urlname;nowname", VaryByCustom = "Crawler")]
public ActionResult Productleft(string classid,string parentid,string urlname,string nowname)

引用:<%--左边内容--%>
<%Html.RenderAction("Productleft", "Userinc", new { classid = Model.Id, parentid = Model.Parentid, urlname = ViewData["urlname"], nowname = Model.Classname }); %>

顶部控件:
[OutputCache(Duration = 19526, VaryByParam = "*", VaryByCustom = "Crawler")]

广告:阿里云采购优惠专区

相关内容

编辑:Admin 时间:2021/12/20 16:24:10 阅览:65   返回    
asp.net mvc
扫描关注53BK报刊官网
扫描关注阅速公司微信