I have an angular-mvc6 application working hand in hand. There are mvc views as well as plain html views in wwwroot/views/
.
The html files are being aggressively cached by either aspnet5 itself or IIS (not sure who). I'd like to disable this kind of caching in development (because obviously I'm always editing the html files then refreshing). I know this is not browser caching, I always do a hard refresh.
I hope this won't have anything to do with IIS, editing web.config is the last thing I want to do in my life right now (more so because I want to disable caching in develpoment only).
EDIT:
Adding the following to wwwroot/web.config
seems to work:
<location path="views/*">
<system.webServer>
<httpProtocol>
<customHeaders>
<add name="Cache-Control" value="no-cache" />
</customHeaders>
</httpProtocol>
</system.webServer>
</location>
So this sucks, it solved the issue but how do I enable this only in development? Do I really really have to write web.config transformations again? I'll wait a bit but if there's no other way I'll make this the answer.