About the cache and compression

Microsoft Forefront Threat Management Gateway cache and compression work together to provide more efficient serving of compression requests. Note the following about how cache and compression work together:

  • Content is cached in one of these formats:
    • Compressed—Content is requested in compressed format and cached in compressed format.
    • Uncompressed—Content is requested in uncompressed format and cached in uncompressed format.
    • Uncompressed and incompressible—If a client requests compressed content and it arrives at the cache uncompressed, it is stored in the cache as incompressible. The next time the request for the same compressed content is received, Forefront TMG recognizes that the content is incompressible, and serves it from the cache uncompressed rather than from the Internet. Content that is inspected is also stored as uncompressed and incompressible.
  • After content is cached, it continues to be served from the cache even if you change the compression status in the cache rule. If you want compression configuration changes to be reflected in the cached content, you must first clear the cache.

To clear the cache, disable the cache through Forefront TMG Management and then delete the cache storage file, such as Dir1.cdat (the default name of the Forefront TMG cache file). There is a cache file in the Urlcache folder on each drive that is configured for caching. After you delete the cache file, enable the cache in Forefront TMG Management.

There is also a sample script that describes how to clear the cache programmatically. For more information, see the document "Deleting Cache Contents" at the Microsoft TechNet Web site.