Configure the Maximum Cache Response Size (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

Set the maximum response size to define the maximum size, in bytes, of the response that can be stored in the output cache. The default value is 262144 bytes (256kb).

Note

Setting the maximum response size to 0 configures IIS to allow any response, regardless of its size, to be stored in the output cache. The total amount of memory used by the output cache is still subject to the maximum cache size memory limit.

Set this setting, also, to limit the eligibility of large responses to be stored in the output cache to save memory.

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).

Exceptions to feature requirements

Levels

  • Web server

Required Permissions

  • Web server administrator

To configure the maximum cache size

You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.

User Interface

To use the UI

  1. Open IIS Manager and navigate to the level you want to manage. For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).

  2. In Features View, double-click Output Caching.

  3. On the Output Caching page, in the Actions pane, click Edit feature settings.

  4. In the Edit Output Cache Settings dialog box, enter the maximum cache response size, in bytes, in the Maximum cached response size (in bytes) box.

  5. Click OK.

Command Line

To <do_something>, use the following syntax:

appcmd command object parameter:value | parameter:variable | parameter:option1 | option2

The variable <variable_name> is <description_of_variable>. For example, to <do_something_specific>, type the following at the command prompt, and then press ENTER:

appcmd <exact_command_to_accomplish_the_procedure>

Note

When you use Appcmd.exe to configure the <element_name> element at the global level in IIS 7, you must specify /commit:WEBROOT in the command so that configuration changes are made to the root Web.config file instead of ApplicationHost.config.

For more information about Appcmd.exe, see Appcmd.exe (IIS 7).

Configuration

The procedure in this topic affects the following configuration elements:

<caching>

For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.

See Also

Concepts

Configuring Output Caching in IIS 7