0

My class Goes like this

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; }
}

My action method is

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

I want the vary By Param to vary with all the properties of my class Search and page

Swagat Swain
  • 495
  • 1
  • 4
  • 22
  • And what is your problem? With the `*` it should vary by each parameter. If you want to specify each parameter manually, you can join them with `;`, i.e. `SearchText;ContinentId`. – Kevin Brechbühl Jun 09 '14 at 07:07
  • It seems to be working fine in my local machine. But its not working in remote. ie in Amazon EC2 – Swagat Swain Jun 09 '14 at 07:17
  • So then you problems isn't really the code? What happens when you have it deployed? Is it not caching at all or is it just serving you the same output every time or what? – JuhaKangas Jun 09 '14 at 09:25
  • Dont know why, but it did not work. Had to remove outputCaching. – Swagat Swain Jul 30 '14 at 07:08

0 Answers0