I have controller action decorated with OutputCache attribute:
[OutputCache(Duration = 60 * 60 * 12, VaryByParam = "*")]
public ActionResult GetProducts(int id, string template, string version)
I would like to disable it in debug mode so I have used web.config transformation so in DEBUG mode I get this extra lines:
<caching>
<outputCache enableOutputCache="false" enableFragmentCache="false" />
</caching>
But cache still works - action result is cached, changing code inside view make no effect when rendered.
Any ideas?
IT Man
[OutputCache]attribute in#if !DEBUGstatement