I have a [ResponseCache] attribute on an action method with the default cache Location = ResponseCacheLocation.Any. But in few cases only I want to override this property to ResponseCacheLocation.Client.
Is there a better way to override the attribute in the action method code than using Response.Headers.Add ? (not even sure if it would work)
Using DefaultHttpContext in the unit test I can access to GetTypedHeaders, but I don't have access to this method from the real Response in the controller.