I need to cache the page specific to logged in user. So I used as mentioned below:
[OutputCache(Duration = 10, VaryByParam = "Id", Location = OutputCacheLocation.Client)]
public ActionResult PartialPageOutputCaching(string Id)
{
return PartialView("PartialPageOutputCaching");
}
OutputCacheLocation.Client did not work for me as it is serving new request every time. I tried to search storing page output cache specific to user, but could not find the right working sample. Please let me know, how OutputCacheLocation.Client suppose to work.
I tried VaryByParam = "Id" assuming that, based on the action methods parameter page content will be cached, but looks like it works on query string parameter. Please confirm how VaryByParam suppose to work.
Thanks in advance.