Friday, October 22, 2010

Add an Output Caching Rule (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista
Output cache rules are helpful when you must cache requests for a certain file type differently than for other file types on your server, site, or application. For example, you might want to keep ASP.NET pages in the cache longer than other file types in your application because the ASP.NET pages require more resources for processing than would the other file types.

Prerequisites

For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see Output Caching Feature Requirements (IIS 7) [ http://technet.microsoft.com/en-us/library/cc754226(WS.10).aspx ] .
Exceptions to feature requirements
  • None

To create an output cache rule

You can perform this procedure using the user interface (UI) or a command line.
To use the UI
  1. Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7) [ http://technet.microsoft.com/en-us/library/cc770472(WS.10).aspx ] . For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7) [ http://technet.microsoft.com/en-us/library/cc732920(WS.10).aspx ] .
  2. In Features View, double-click Output Caching.
  3. Click Add in the Actions pane.
  4. In the Add Cache Rule dialog box, in the File name extension box, enter the file name extension, such as .aspx, for which you want to create a cache rule.
  5. Select the User -mode caching check box to enable output caching, and select one of the following options:
    • Using file change notifications: if you want an item to be removed from the cache when it is updated.
    • At time intervals (hh:mm:ss): if you want an item to be removed from the cache after a certain time elapses. Then type a time in the format of hh:mm:ss (where h is hours, m is minutes, and s is seconds) in the corresponding box.

      noteNote
      If you configure different values for this property in the User-mode caching and Kernel-mode caching sections, the value in the Kernel-mode caching section will be used.
    • Prevent all caching: to prevent all caching of the designated file type.
  6. Select the Kernel-mode caching check box if you want to enable kernel caching in addition to output caching, and select one of the following options:
    • Using file change notifications: if you want an item to be removed from the cache when it is updated.
    • At time intervals (hh:mm:ss): if you want an item to be removed from the cache after a certain time elapses. Then type a time in the format of hh:mm:ss (where h is hours, m is minutes, and s is seconds) in the corresponding box.
    • Prevent all caching: to prevent all caching of the designated file type.
  7. Click OK.

Configuration

The procedure in this topic affects the following configuration elements:
collection under the element
For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema [ http://go.microsoft.com/fwlink/?LinkId=88551 ] on MSDN.

source: http://technet.microsoft.com/en-us/library/cc770547%28WS.10,printer%29.aspx

No comments: