Like the question says, I wanted to know if it's possible to turn off caching on all controllers and actions for my entire site. Thanks!
相关问题
- Entity Framework throws exception - Network Relate
- Slow loading first page - ASP.NET MVC
- jsp caching tag library
- How to do an inline style with asp.net mvc 3 razor
- How to access the System.ComponentModel.DataAnnota
相关文章
- “Dynamic operations can only be performed in homog
- Change color of bars depending on value in Highcha
- Is there a google API to read cached content? [clo
- How to get server path of physical path ?
- How to find the exceptions / errors when TryUpdate
- ASP.Net MVC 3: optgroup support in Html.DropDownLi
- AWS API Gateway caching ignores query parameters
- Check if url is cached webview android
Yes, depending on the approach you take. I like applying the actions to a base controller (hence my reply there). You could implement the filter at the link below and implement it as a global filter as well (registered in your global.asax.cs)
Disable browser cache for entire ASP.NET website
In web.config you can add additional headers to go out with every response
Create a Global Action Filter and override
OnResultExecuting()
:And then register this in your global.asax, like so:
In summation, what this does is create a Global Action Filter so that implicitly this will be applied to all Controllers and all Actions.
You should add this method to your Global.asax.cs file
This disables cache on every request (images, html, js etc.).