I have this example of OutputCache. My problem is that I want the page to be cached only if the [id] equals to NULL. In all other cases I don't want to have cache at all.
MyController:
[OutputCache(Duration = int.MaxValue, VaryByParam = "id")] public ActionResult Details(int id) {} RouteConfig:
routes.MapRoute( name: "edit", url: "edit/{id}", defaults: new { controller = "asd", action = "Details", id = UrlParameter.Optional } );