Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable OutputCache on Development System

I use OutputCache in an ASP.net MVC application. As developing with an active OutputCache is not very pleasant I want to disable the OutputCache on the Development Systems (local machines and development server).

What is the best way to do this?

like image 712
chbu Avatar asked May 07 '10 12:05

chbu


People also ask

What is the use of @OutputCache?

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.

How do I enable caching in IIS?

The cache is fairly easy to configure using the user interface feature in the new IIS administration tool. From the Start menu, click Administrative Tools, and then click Internet Information Services (IIS) Manager. In the tree view on the left side, find your application. Select the Output Caching menu item.


1 Answers

It's an old one but...

set this in your web.config under system.web

<caching>
  <outputCache enableOutputCache="false" />
</caching>
like image 134
Tony Basallo Avatar answered Sep 29 '22 12:09

Tony Basallo