Would it make sense to [OutputCache] something like this?
[HttpGet]
public ActionResult About()
{
return this.View("About");
}
Would it make sense to [OutputCache] something like this?
[HttpGet]
public ActionResult About()
{
return this.View("About");
}
Copyright © 2021 Jogjafile Inc.
It depends on what is in the View. For example if it a heavier view and the output is same for all the users then yes you should use the
[OutputCache]filter. This will reduce the timing on the server side for:When you use the
[OutputCache]filter consider setting the parameters properly. i.e. cache duration and others as needed.