About cache settings

The Microsoft Forefront Threat Management Gateway cache feature consists of the following elements:

  • Cache storage—Cache management settings that specify how objects are stored.
  • Cache rules—Cache rules determine which content is cached and how it is served from the cache.
  • Content download jobs—Microsoft Job Scheduler service runs content download jobs, which fetch Internet content in accordance with job settings.

Cache Storage

Forefront TMG stores cached objects on the local hard drive and, for faster access, stores the most popular objects on both the disk and in RAM. The cache file has the following properties:

  • You must use a formatted NTFS file system partition for the cache, and the cache drive must be local. When you configure a cache drive, a cache-content file Dir1.cdat is created in the following location: drive:\urlcache.
  • The maximum size for a cache file on a single drive is 64 GB.
  • We recommend that you locate the file on a separate physical disk, separate from the disk on which the operating system, Forefront TMG, and the page files are installed. This reduces contention on the system and boot disk.
  • For each server, you can configure the size and location of the cache. We recommend that you allocate a large cache, because objects are dropped from the cache when the maximum size is exceeded.
  • You can configure cache storage as follows:
    • Specify the types of objects that can be cached. You can cache objects that do not have a time stamp. You can create custom cache rules to specify how long such objects should remain in the cache. You can also specify that objects that do not return an OK response (an HTTP 200 status code) can be cached.
    • Specify that URLs larger than the maximum size limit cannot be stored in the RAM cache.
    • Objects cached in memory are retrieved faster than those on disk, and excessively large objects may fill up the RAM cache. The default setting is 12800 bytes.

For instructions about configuring cache storage, see Enabling caching.

Cache performance counters provide information about cache memory performance, cache space, and URL handling. Based on this information, you can modify cache settings as required. For more information, see Cache performance counters.

Cache rules

Create cache rules that specify destinations from which content should be cached, and how that content is served from the cache. You specify a destination that may be an entire network, a domain, a set of URLs, or IP addresses. You can specify the following with a cache rule:

  • Specify how content retrieved by the rule is returned to the client. Valid or expired objects can be returned, and requests can be routed to the Internet or, if no cached object is available, dropped.
  • Specify which types of content to cache. By default, objects are stored in the cache only when source and request headers indicate caching. You can change default settings in order to specify that content should not be cached or that other types of content should be cached, even if source and request headers do not indicate caching.
  • Specify a maximum size for objects that the rule caches.
  • Specify whether SSL responses should be cached. This does not apply for forwarding caching when internal clients request Internet resources because such requests are tunneled and Forefront TMG does not inspected them. It does apply to reverse caching, where external client SSL requests are terminated at the Forefront TMG server and sent over a new connection to internal Web servers.
  • Enable caching of HTTP objects.
  • Specify how long objects should remain in the cache. Unless the source specifies an expiration time, HTTP objects remain in the cache according to the time-to-live (TTL) settings for the rule. You can set a TTL based on a percentage of the time that has passed since the object was created or modified, which is contained in the header.
  • Enable caching of FTP objects and a TTL to indicate how long FTP objects should remain in the cache.

For instructions about configuring cache rules, see Configuring cache rules.

Content download jobs

Cache-content download jobs are run by the Microsoft Forefront TMG Job Scheduler service, which works as follows:

  • The Job Scheduler service runs under the Network Service account on the Local Host network. The service sends multiple requests to Internet sites, based on URLs specified in content download jobs.

For instructions, see Configuring content download jobs.