How do I use VaryByParam with multiple parameters?

后端 未结 2 510
南旧
南旧 2020-12-23 20:07

In ASP.NET MVC2 I use OutputCache and the VaryByParam attribute. I got it working fine with a single parameter, but what is the correct syntax when

2条回答
  •  天涯浪人
    2020-12-23 20:55

    You can use * for all parameters or a semi-colon separated list (VaryByParam = "customerId;languageId").

    You can also use none if you didn't want it to cache different versions....

    Here's a nice write up specifically for MVC.

提交回复
热议问题