Microsoft KB Archive/259817

From BetaArchive Wiki

Article ID: 259817

Article Last Modified on 10/31/2006



APPLIES TO

  • Microsoft Proxy Server 2.0 Standard Edition



This article was previously published under Q259817

SUMMARY

The caching feature in Microsoft Proxy Server supports Web Proxy clients by caching Web content that is retrieved from the Internet. The cached content is stored in any of the following:

  • A single local NTFS partitions on the Proxy Server.
  • Across multiple local NTFS partitions on the Proxy Server.
  • On NTFS partitions across multiple Proxy Servers if a proxy server array architecture is implemented.

NOTE: Caching cannot be implemented unless at least one NTFS partition is available locally.

MORE INFORMATION

When Web Proxy clients generate HTTP or FTP "GET" requests, the proxy server checks its local cache for the requested Web content (if caching is enabled), and if cached, returns it to the client. If the content is not available in the cache, the proxy server retrieves the content, caches it, and then returns a copy to the client that generated the "GET" request. The caching features of Microsoft Proxy Server can reduce the number of "Internet" requests that are generated in response to client HTTP/FTP requests, and this results in a user-perceived faster delivery of content to the desktop. This also reduces bandwidth consumption on the Internet network connection which can be critical in environments that have slow connections (such as a 56 kilobyte modem connection).

You can configure caching during the initial installation of Proxy Server, or you can configure and/or modify it after proxy has been installed and is functioning. This article describes both scenarios, and provides suggestions for modifying caching on a proxy server.

Configuring Caching During the Initial Proxy Installation

Proxy Server 2.0 enables caching by default, and tries to configure a 100 megabyte (MB) caching folder on an NTFS partition during the installation process. For additional information about how to install Proxy Server 2.0 on Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base:

253131 How to Install Proxy Server 2.0 on Windows 2000


If no NTFS partitions are available, caching is not set up. You can create an NTFS partition by using the Convert.exe command. For additional information about how to use Convert.exe to convert a partition to NTFS, click the article number below to view the article in the Microsoft Knowledge Base:

214579 How to Use Convert.exe to Convert a Partition to NTFS


If the installation partition is NTFS, Proxy tries to set up a 100 MB caching partition. You can change the size of the partition during the installation (5 MB minimum) and/or you can designate another NTFS partition on the server for the caching folder. During the installation process, all available NTFS partitions on the server are discovered, so you can configure multiple partitions if you want to.

A Urlcache folder is created on each NTFS partition that is configured, and a number of sub-folders is created depending on the size of the configured cache (the default is 5 sub-folders). The following registry key is created, and the path information to the folders and sub-folders that were created is in the Parameters folder:

HKEY_LOCAL_MACHINE\SYSTEM\CCS\SERVICES\W3PCache


Example

You create a 100 MB cache folder on NTFS partitions on drives C and D. The Urlcache folder on drive C (where Proxy 2.0 is installed) has 3 sub-folders in it (Dir1, Dir2, and Dir3). On drive D, the Urlcache folder has 2 sub-folders (Dir1 and Dir2) in it. This information is reflected in the registry. If the size of a cache folder is modified, the number of sub-folders either increases or decreases as required

NOTE: Decreasing the size of a cache folder could result in the loss of cached information that cannot be recovered). For example, you increase the cache size on drive D from 100 MB to 600 MB. The result is that the Urlcache folder on drive D now contains more sub-folders (Dir1, Dir2, Dir3, and Dir4). Nothing has changed on drive C, but the registry key now reflects 4 of the 5 paths to be pointed to the drive D Urlcache folder, and only one to drive C. The preferred cache drive to use is the partition with the most space configured for caching. Note that the administrator can control this by altering the size and/or location of the cache partitions.

If during the installation process the Enable caching check box is not selected (remains unchecked), a 100 MB caching partition is still configured on either the Proxy installation partition (if it is NTFS) or the first NTFS partition on the server. The Urlcache folder and 5 sub-folders are created as well as the registry key. However, no caching occurs until you click to select the Enable caching check box on the Web Proxy server. To locate this, right click Web Proxy, click Properties, and then click the Caching tab.

Configuring or Modifying Caching after the Installation

You can modify proxy caching after Proxy Server has been installed and is functioning. The following list includes typical reasons for modifying the cache:

  • Increase and/or decrease the cache size.
  • Delete a Urlcache folder on one NTFS partition, and then move it to another partition.
  • Move the proxy cache to an NTFS partition on another physical drive that is faster.
  • Move the proxy cache off of the operating system partition.
  • Improve caching performance by adding additional caching capability to the server.


The most important thing to remember about Proxy caching is that changes should only be made by using the interface provided under Web Proxy\Properties\Caching\Cache Size. Deleting Urlcache folders and their associated sub-folders does not modify caching other than it deletes any cached content that is contained in the folder structure, and this content cannot be recovered. After you delete a Urlcache folder on an NTFS partition, stopping and then starting the Web Proxy service results in the folder structure being recreated from the registry. However, this structure does not contain any cached content.

To modify caching, decide on what changes are to be made and then use the interface in Web Proxy to increase, decrease or add additional caching partitions. To ensure that all of the changes are reflected in the registry, you must use the "SET" function. The recommended procedure for deleting a cache partition is to first verify that another cache partition has been created on an NTFS partition on the local server and "SET". Then select the partition to be deleted and "SET" the size to zero. After this is done and is committed to the registry, you can delete the Urlcache folder on the partition and it is not created. Also, before you delete a cache partition that has been replaced by another partition, the functionality/performance of the new partition should be verified. One method for doing this is to use the Performance Monitor counters installed by Proxy for this purpose (Web Proxy Server Cache).

NOTE: Proxy server requires at least one NTFS partition to contain a Urlcache folder structure, even if caching is not enabled. If there is only one cache partition left on a Proxy server, it cannot be deleted or "SET" to zero by using the interface. If it is "SET" to zero, the OK button is unavailable in the interface, and this prevents you from completing the action. If the Web Proxy service is stopped and the W3PCache registry key is then deleted, Web Proxy does not start (remember Proxy is essentially an ISAPI filter, W3proxy.dll). An error is recorded in the System log. For example:

Event ID: 14 'The HTTP filter DLL C:\InetPub\Scripts\Proxy\w3proxy.dll failed to load. The data is the error'

The Urlcache folders are not protected from being mistakenly deleted. To prevent the folder from being deleted, administrators may want to consider setting the Hidden attribute.

This article describes Proxy Server 2.0 caching folders, including recommendations regarding the proper procedures for adding, modifying, monitoring or deleting cache partitions. For more detailed information about the built-in caching functionality in Proxy Server, please consult the product documentation that is installed by default, or view the following Microsoft Proxy 2.0 FAQ Web site:


Additional query words: urlcache directory 2.00 directories

Keywords: kbhowto KB259817