Tuesday, December 21, 2010

C# Caching

For asp.net apps there are many different kinds of caching available. This includes browser caching, partial page caching, data caching, and others.

The first and foremost is browser caching. Browsers will automatically cache references to your js, css, and images. Although you might need to add the following to your web.config to give it a hint about the js files:

The can also have the following to give it a hint on how long to cache the static content:

For the actual pages, see one of the links above. You have pretty good control over what is and isn't cached in the app itself.

No comments: