具有多个VaryByParam的OutputCache

时间:2014-06-09 06:48:37

标签: asp.net-mvc asp.net-mvc-3 output-caching

我的课程就像这样

public class Search
{

    public string SearchText { get; set; }
    public string ContinentId { get; set; }

    public string CategoryId { get; set; }
    public string InformationById { get; set; }
    public string City { get; set; }
    public string CountryId { get; set; }
    public string NameOfOwner { get; set; }
    public string RegistrationType { get; set; }
}

我的行动方法是

[OutputCache(Duration =60, VaryByParam = "*")]
    public PartialViewResult Search(Search search, int? page)
    {
        //Code goes here
    }

我希望vary By Param随我的类Search和page

的所有属性而变化

0 个答案:

没有答案