Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I turn off caching for my entire ASP.NET MVC 3 website?

Tags:

People also ask

What is the property that used to disable the cache storage in ASP.NET MVC?

You can use the OutputCacheAttribute to control server and/or browser caching for specific actions or all actions in a controller.

How do I disable cache in web config?

If you want to disable caching of all files in a folder and its subfolders you can add a Web. config in the root folder you want to disable browser caching for. Say you wanted to disable browser caching for the files in the folder js/nocache and all subfolders, then you would place the Web. config here: js/nocache/Web.

What is MVC output caching?

The output cache enables you to cache the content returned by a controller action. That way, the same content does not need to be generated each and every time the same controller action is invoked. Imagine, for example, that your ASP.NET MVC application displays a list of database records in a view named Index.


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!