Enabling caching

This topic describes how to enable and configure the cache. Microsoft Forefront Threat Management Gateway implements a cache of frequently requested objects to improve the speed of Web access and improve network performance. For more information, see Overview of caching. Configuring caching consists of the following steps:

  • Enable caching. To enable caching, you have to specifically allocate disk space for the cache. By default, after installation, no space is defined for the cache. Caching can be enabled when you run the Web Access wizard. Alternatively, you can enable caching using the instructions in this topic.
  • Configure how objects are cached and how expired objects are served from the cache.

Where to start. To open cache properties, in the Forefront TMG Management console tree, click the Firewall Policy node, and select the Web Access Policy tab. Under Related Tasks, click Configure Web Caching.

To enable caching

  1. On the Cache Drives tab, select the server entry, and then click Configure.
  2. Select the required drive, and in Maximum cache size, specify the maximum size in megabytes. Click Set to save the setting. Click Reset to set the value back to 0. The maximum size for a single cache file is 64 GB. If you require a larger cache store, you can split it into several files over different drives.
  3. To disable caching, set the cache drive size to zero. Check cache rules before disabling caching. Content served only from the cache will not be available if caching is disabled.

To configure cache properties

On the Advanced tab, configure the following:

  • Leave the default setting Cache objects that have an unspecified last modification time enabled to indicate that pages or objects that do not have a time stamp of the last modification can still be cached.
  • Leave the default setting Cache object event if they do not have an HTTP status code of 200 to indicate that pages without this status code should be cached. The HTTP 200 status code is an OK response to a Web server that indicates that a request is fulfilled and that a complete page has been obtained.
  • In Maximum size of URL cached in memory, specify a maximum limit on the size of objects stored in memory. This is useful to prevent excessive caching of large objects, such as graphics. A limit that is too low may hinder caching performance, because objects are served more quickly from memory (RAM) cache.
  • Configure negative caching to specify when expired cache objects should be returned, as follows:
  • Select Do not return the expired object (return an error page) to indicate that negative caching should not be used. Negative caching allows you to specify in what circumstances expired cache objects should be returned to users when a required Web server is not available.
  • Select Return the expired object only if expired was to indicate that in some circumstances an expired object should be returned.
  • Select At less that this percentage of original Time-To-Live to specify how long an expired object should be served from the cache based on a percentage of the original Time-to-Live (TTL). A TTL value is specified in every cache rule you create. For example, if you specify a value of 59, the maximum period in which the expired object is returned is 50 percent of the original TTL setting.
  • Select But no more than (minutes) to indicate that an expired object should not be returned if the expiry time was greater than the number of minutes indicated, even if it is within the TTL setting specified previously.
  • In Percentage of free memory to use for caching, specify the percentage of available RAM made available for caching. The default is 10 percent.