title: Disable OutputCaching in MVC3 when running in DEBUG or under Debugger?
body: <p>I am trying to disable output caching in a MVC3 app when in debug.  I am specifying output caching in the controllers (via the attribute) but don't want to have to #if DEBUG all over my code. I expected this to work:</p>
  
  <pre><code>// In Web.config.debug
    &lt;system.web&gt;
      &lt;caching&gt;
        &lt;outputCache enableOutputCache="false"
                     xdt:Transform="Replace" /&gt;
      &lt;/caching&gt;
  </code></pre>
  
  <p>But this seems to be ignored.  Any other ideas how to do it system wide without nasty global.asax code or #if DEBUGs everwhere?</p>