About caching scenarios

Microsoft Forefront Threat Management Gateway provides two types of caching:

  • Forward caching—Forward caching provides cached Web objects to internal users making Web requests to the Internet.
  • Reverse caching—Reverse caching provides cached content from internal Web servers published by Forefront TMG to external users. Reverse caching is enabled by default when caching is enabled. In some circumstances, you may want to disable this setting. For instructions, see Disabling reverse caching.

Forward caching

Forward caching occurs when a user located on a network protected by Forefront TMG makes a request for Web content located on the Internet.

Available in the cache

The following occurs when an internal user requests content that is in the cache.

  1. The user initiates a Web request.
  2. Forefront TMG intercepts this request and checks the cache (either in the RAM-based cache or disk-based cache).
  3. If the content it available, it is returned to the user in accordance with the cache settings. The settings determine whether only valid objects can be returned to the client.
  4. The content is moved to the in-memory cache in accordance with cache settings. After a period of time (determined by the caching algorithm), if the content is no longer being requested regularly, Forefront TMG copies the content to its disk-based cache and flushes it from RAM. If another user then requests content stored in the disk-based cache, Forefront TMG returns it to the in-memory cache.

Not available in the cache

The following occurs when an internal user requests content that is not in the cache.

  1. The user initiates a Web request.
  2. Forefront TMG intercepts this request and checks the cache (either in the RAM-based cache or disk-based cache).
  3. If the content is not in cache or has expired, Forefront TMG forwards the request to the Internet Web server.
  4. The Web server returns the requested information. If cache settings indicate, Forefront TMG places Web content in its in-memory cache, where it stores the most popular and frequently requested content for rapid retrieval.
  5. The content is returned to the user.
  6. After a period of time (determined by the caching algorithm), if the content is no longer being requested regularly, Forefront TMG copies the content to its disk-based cache and flushes it from RAM. At this point, the only copy of the content resides in the disk-based cache.

Reverse caching

Reverse caching takes place when Internet users request content from a Web server published by Forefront TMG. The following occurs when an external user requests content from a published Web server.

  1. The Internet user sends a request for content located on a corporate Web server.
  2. Forefront TMG intercepts the request and checks whether the content is in the cache. If the content is not in cache or has expired, Forefront TMG forwards the request to the Web server on the corporate network.
  3. The corporate Web server returns the requested information to Forefront TMG.
  4. In accordance with cache settings, Forefront TMG places the Web content in its in-memory Web cache, where it stores the most popular and frequently requested content for rapid retrieval.
  5. Forefront TMG then returns the content to the Internet user who requested it. After a period of time (determined by the caching algorithm), if the content is no longer being requested regularly, Forefront TMG copies the content to its disk-based cache and flushes it from RAM.
  6. Forefront TMG services subsequent Internet user requests for corporate Web resources from either its in-memory or disk-based Web cache.