ASP.NET Performance Tips
page 7 of 19
by Adiseshu Dasari
Average Rating: 
Views (Total / Last 10 Days): 75152/ 122

Kernel Caching (Only with IIS 6.0)

If you are using IIS 6.0, there is a nice little feature called kernel caching that does not require any code changes to ASP.NET. When a request is output-cached by ASP.NET, the IIS kernel cache receives a copy of the cached data. When a request comes from the network driver, a kernel-level driver (no context switch to user mode) receives the request, and if cached, flushes the cached data to the response, and completes execution.

The following default setting in the Machine.config file ensures that dynamically generated ASP.NET pages can use kernel mode caching, subject to the requirements listed below.

Listing 2

<httpRunTime enableKernelOutputCache="true" . . ./>

Dynamically generated ASP.NET pages are automatically cached subject to the following restrictions:

·          Pages must be retrieved by using HTTP GET requests. Responses to HTTP POST requests are not cached in the kernel.

·         Query strings are ignored when responses are cached. If you want a request for to be cached in the kernel, all requests for are served from the cache, regardless of the query string.

·          Pages must have an expiration policy. In other words, the pages must have an Expires header.

·          Pages must not have VaryByParams.

·          Pages must not have VaryByHeaders.

·         The page must not have security restrictions. In other words, the request must be anonymous and not require authentication. The HTTP.sys driver only caches anonymous responses.

·         There must be no filters configured for the W3wp.exe file instance that are unaware of the kernel cache.

View Entire Article

User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 

Community Advice: ASP | SQL | XML | Regular Expressions | Windows

©Copyright 1998-2024  |  Page Processed at 2024-05-24 9:06:01 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search