Questions tagged «outputcache»

2
如何将VaryByParam与多个参数一起使用?
在ASP.NET MVC2中,我使用OutputCache和VaryByParam属性。我只用一个参数就可以正常工作,但是当方法上有多个参数时,正确的语法是什么? [OutputCache(Duration=30, VaryByParam = "customerId"] public ActionResult Index(int customerId) { //I've got this one under control, since it only has one parameter } [OutputCache(Duration=30, VaryByParam = "customerId"] public ActionResult Index(int customerId, int languageId) { //What is the correct syntax for VaryByParam now that I have a second parameter? } …
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.