在调试时,我正在尝试禁用MVC3应用程序中的输出缓存。我在控制器中指定了输出缓存(通过属性),但我不想让#if DEBUG遍及我的代码。我原以为这能行得通:
// In Web.config.debug
<system.web>
<caching>
<outputCache enableOutputCache="false"
xdt:Transform="Replace" />
</caching>
但这一点似乎被忽视了。有没有其他的想法,如何在没有讨厌的global.asax代码或#if DEBUGs的情况下在系统范围内做到这一点?
https://stackoverflow.com/questions/5287005
复制相似问题