Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

Output Caching

Published: February 29, 2012

Updated: February 29, 2012

Applies To: Windows Server 2012, Windows Server 2012 R2



Use the Output Caching feature page to configure output cache settings and to configure rules that control caching of served content.

Sort the list by clicking one of the feature page column headings or select a value from the Group by drop-down list to group similar items.

Related scenarios

In this document

The following tables describe the UI elements that are available on the feature page and in the Actions pane.

 

Element Name Description

Extension

Displays the file name extension for which the cache rule applies.

User-Mode Policy

Displays the user-mode cache behavior for the rule:

  • Cache until change: content is cached until IIS receives a file or configuration change notification.

  • Cache for time period: content is cached for a specific duration unless a file or configuration change notification clears the cache before the duration elapses.

  • Prevent all caching: user-mode caching has been disabled.

  • Do not cache: user-mode caching has not been configured.

Kernel-Mode Policy

Displays the kernel-mode caching behavior for the rule:

  • Cache until change: content is cached until IIS receives a file or configuration change notification.

  • Cache for time period: content is cached for a specific duration unless a file or configuration change notification clears the cache before the duration elapses.

  • Prevent all caching: kernel-mode caching has been disabled.

  • Do not cache: kernel-mode caching has not been configured.

Entry Type

Displays whether the item is local or inherited. Local items are read from the current configuration file, and inherited items are read from a parent configuration file.

 

Element Name Description

Add

Opens the Add Cache Rule dialog box in which you can add a cache rule.

Edit

Opens the Edit Cache Rule dialog box in which you can edit the selected cache rule.

Remove

Removes the selected caching rule.

Edit Feature Settings

Opens the Edit Output Cache Settings dialog box in which you can configure settings that apply to the entire output caching feature.

Use the Add Cache Rule or Edit Cache Rule dialog box to configure how IIS caches content for a specific file name extension. You can configure settings for both user-mode and kernel-mode caching.

 

Element Name Description

File name extension

Specifies the file name extension (such as .aspx) to which the caching rule applies. To apply the rule to all file name extensions, type an asterisk (*) in the box.

User-mode caching

Configures the rule to store content in the output cache, which is in user mode. Select an option under File Cache Monitoring to configure how or when the output cache is updated for any files that are cached because of this rule.

Using file change notifications (under the User-mode caching option)

Configures the files (that are cached because of this rule) to be removed from the output cache when IIS receives a file or configuration change notification.

At time intervals (hh:mm:ss) (under the User-mode caching option)

Configures the files (that are cached because of this rule) to be removed from the output cache after a specific duration unless a file or configuration change notification clears the cache before the duration elapses.

The value in the corresponding box specifies the length of time that content is stored in the output cache. The time is formatted as hh:mm:ss (where hh is hours, mm is minutes, and ss is seconds). The default duration is 30 seconds. Setting the value too low can affect server performance by forcing items to be updated more frequently than necessary.

noteNote
When you select both user-mode caching and kernel-mode caching, and configure each mode to use the At time intervals (hh:mm:ss) option, specify the same duration value for both modes. If the values are not the same, the duration that is specified for kernel-mode caching is used.

Prevent all caching

Configures the files (that match the file name extension) not to be stored in the output cache.

This setting corresponds to the DisableCache setting in configuration, and differs from the DontCache setting that appears in configuration when you do not select the User-mode caching option in IIS Manager. The DontCache setting means that the output cache module does not set the user-mode caching policy, but if another module sets the caching policy, the output cache module caches the response. The DisableCache setting means that the output cache does not cache the response even when another module tries to enable user-mode caching by setting the user-mode caching policy.

Advanced

Opens the Advanced Output Caching Settings dialog box in which you can configure the cache rule to cache different versions of a response based on query strings and headers. These options are available only for user-mode caching.

Kernel-mode caching

Configures the rule to store content in the kernel cache, which is in kernel mode. Select an option under File Cache Monitoring to configure how or when the kernel cache is updated for any files that are cached because of this rule.

Using file change notifications (under the Kernel-mode caching option)

Configures the files (that are cached because of this rule) to be removed from the kernel cache when IIS receives a file or configuration change notification.

At time intervals (hh:mm:ss) notifications (under the Kernel-mode caching option)

Configures the files (that are cached because of this rule) to be removed from the kernel cache after a specified time elapses.

The value in the corresponding box specifies the length of time that content is stored in the kernel cache. The time is formatted as hh:mm:ss (where hh is hours, mm is minutes, and ss is seconds). The default duration is 30 seconds. Setting the value too low can affect server performance by forcing items to be updated more frequently than necessary.

noteNote
When you select both user-mode caching and kernel-mode caching, and configure each mode to use the At time intervals (hh:mm:ss) option, specify the same duration value for both modes. If the values are not the same, the duration that is specified for kernel-mode caching is used.

Prevent all caching notifications (under the Kernel-mode caching option)

Configures the files (that match the file name extension) not to be stored in the kernel cache.

This setting corresponds to the DisableCache setting in configuration, and differs from the DontCache setting that appears in configuration when you do not select the Kernel-mode caching option in IIS Manager. The DontCache setting means that the output cache module does not set the kernel-mode caching policy, but if another module sets the caching policy, the output cache module caches the response. The DisableCache setting means that the kernel cache does not cache the response even when another module tries to enable kernel-mode caching by setting the kernel-mode caching policy.

Use the Edit Output Cache Settings dialog box to configure settings that affect the entire Output Caching feature. These settings affect all the output caching rules that you configure on the Output Caching feature page.

 

Element Name Description

Enable cache

Enables the IIS output cache, which stores cached responses in user mode.

noteNote
The IIS output cache is similar to the ASP.NET output cache. However, this IIS cache is a native output cache that offers increased performance over the managed output cache in ASP.NET.

Enable kernel cache

Enables the kernel cache, which stores cached responses in kernel mode. Performance is improved when responses are returned from the kernel cache without transitioning to user mode.

Maximum cached response size (in bytes)

Specifies the maximum size of a cached response for both the user-mode and kernel-mode caches. The default value is 262144 bytes. This field is enabled at the server level only; it is read-only at all other levels.

Cache size limit (in MB)

Configures the size limit of both the user-mode and kernel-mode caches. You can type a size (in MB) or type 0. If you type 0, IIS uses half of the available physical memory or virtual memory, whichever is less. This field is enabled at the server level only; it is read-only at all other levels.

Use the Advanced Output Caching Settings dialog box to configure caching of different file versions based on query strings and headers. These settings are available only for the user-mode cache.

 

Element Name Description

Query string

Type a query string or a comma-separated list of query strings to define the values that the Web server uses to vary cached responses to the URL. You can also type an asterisk (*) to configure the rule to vary cached responses for all query strings.

Headers

Type a header or comma-separated list of headers to define the values that the Web server uses to vary cached responses to the URL. You can also type an asterisk (*) to configure the rule to vary cached responses for all headers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.