Manually Override Cache-Control Directives Using ARR

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

This topic describes how to write a cache control rule to manage the cache control directives that control caching behavior such as the ability to cache and cache duration. This is particularly useful when the cache control directives are missing in the response header or when you want to override the cache control directives in a response. Note that Application Request Routing (ARR) will override any directives in a response header. For example, if the response header says, “Do not cache,” but the cache control rule is set to cache, ARR will cache the content. You should be familiar with the disk-based cache feature in ARR before you continue.

Configure Cache Control Rules

ARR allows for multiple cache control rules, including rules to only cache content based on URL patterns or host names, or to not cache certain content. The cache control rules are processed in the list from top to bottom.

To configure cache control rules

  1. Open IIS Manager.

  2. In the Connections pane, expand the server node.

  3. In the Server pane, double-click Application Request Routing Cache.

  4. On the Application Request Routing Cache page, in the Actions pane, click Cache Control Rules….

  5. On the Cache Control Rules page, in the Actions pane, click Add….

  6. In the Add Cache Control Rule dialog box, follow these steps:

    • In the Apply rule list, select when you want to apply the cache control rule: When no cache control directive exists or Always.

    • Select Do not cache or Cache.

    • If you selected Cache, enter the duration in the Cache duration (minutes) box.

    • In the Host name box, optionally enter the name of your host site.

    • In the URL box, optionally enter the URL.

  7. Click OK.

See Also

Concepts

Disk Caching Tasks for IT Pros
ARR Tasks for IT Pros
ARR Common Tasks