oscilatingcretin
oscilatingcretin

Reputation: 10919

What is the <caching> node in the web.config?

Ours looks like this:

    <caching>
        <profiles>
            <add extension=".css" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
            <add extension=".gif" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
            <add extension=".jpg" policy="CacheUntilChange" kernelCachePolicy="DontCache" />
        </profiles>
    </caching>

I am wondering because our production website does not have this node, but our local dev web.config does.

Upvotes: 3

Views: 16450

Answers (2)

Akram Shahda
Akram Shahda

Reputation: 14781

The element allows you to enable or disable page output caching for an Internet Information Services (IIS) 7 application. This element also allows you to configure whether IIS caches page output in user mode, kernel mode, or both and what, if any, output caching limits you want to impose.

The element also contains a element that contains a collection of output cache settings that you can apply to ASP.NET pages.


Refer to:

http://www.iis.net/ConfigReference/system.webServer/caching

http://msdn.microsoft.com/en-us/library/ms178597.aspx

http://msdn.microsoft.com/en-us/library/ms178606.aspx

http://www.asp.net/moving-to-aspnet-20/tutorials/caching

Upvotes: 7

Dustin Laine
Dustin Laine

Reputation: 38503

To me it should be the opposite, you want to cache on production and not necessarily on development.

The details for caching.

Upvotes: 3

Related Questions