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?
}
दोनों मापदंडों का उपयोग करके पृष्ठों को कैश करने के लिए मुझे यह कैसे मिलेगा? क्या मैं विशेषता को दो बार जोड़ सकता हूं? या मान के रूप में "customerId, languageId" लिखें ??