MVC3 OutputCache not working on Server and Client as expected
I'm having trouble using the OutputCache attribute in Microsoft's MVC3 framework. Please imagine the following controller action, which can be used as part of an AJAX call to get a list of products based on a particular manufacturerId: public JsonResult GetProducts(long manufacturerId) { return Json(this.CreateProductList(manufacturerId), JsonRequestBehavior.AllowGet); } I want this result to be cached on the server to avoid making excessive database queries. I can achieve this by configuring the attribute thus: [OutputCache(Duration = 3600, Location = OutputCacheLocation.Server, VaryByParam =