How to: Change Cache Settings for Team Foundation Server Proxy

As a Team Foundation Server administrator, you can change the settings for the source control file cache when you configure Team Foundation Server Proxy after installation or at any other time.

Note

After installing Team Foundation Server Proxy, you must configure Team Foundation Server Proxy in order to enable and manage the cache. For more information, see How to: Enable Source Control Caching for Team Foundation Server Proxy.

You can change cache settings in the following ways:

  • Specify a different cache root folder.

  • Change the cache limit at which old files are removed from the cache.

  • Change the amount of space to free when old files are removed.

  • Change the interval for saving cache performance information to a file.

You can perform these tasks by editing the Proxy.config file on the proxy computer. The Proxy.config file is located in the proxy installation directory. For more information, see Team Foundation Server Proxy Web.Config File Settings.

Note

The default proxy installation directory is …\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\VersionControlProxy.

After performing one or more of these tasks, you must recycle the application pool by using the IISRESET command to retrieve the latest version of the Proxy.config file.

Required Permissions

To perform this procedure, you must be a member of the Administrators security group on the Team Foundation Server Proxy computer.

To specify a different cache root folder

  1. On the Team Foundation Server Proxy computer, create a new cache folder.

    You can create the new cache folder in the following locations: on a local disk, in the UNC path, or on a mounted drive. Make sure that this folder has sufficient space because it can contain files from all Team Foundation servers that the proxy represents.

    Security noteSecurity Note

    The cache folder stores sensitive information that is not encrypted. Therefore, make sure that only the Team Foundation Server Proxy service account has Read and Write permissions to the cache folder. For more information, see How to: Configure Cache Security for Team Foundation Server Proxy.

  2. Open Windows Explorer and locate the proxy installation directory.

  3. Open Proxy.config in a text or XML editor.

  4. Locate the <CacheRoot> element.

  5. Update the <CacheRoot> element by changing the current cache root folder location to the new location as follows:

    <CacheRoot>NewCacheRootFolderLocation</CacheRoot>
    
  6. Save and close the Proxy.config file.

    Tip

    To maximize performance, copy the files from the old cache folder to the new cache folder.

  7. On the proxy computer, on the Start menu, click Run, and type the following:

    IISRESET

    Performing this action retrieves the latest Proxy.config file.

  8. Delete the old cache root folder.

    Tip

    The default cache root folder is located at …\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\Web Services\VersionControlProxy\Data.

Changing the Cache Limits for Removing Old Files

To change the limit at which old files are removed from the cache

  1. On the Team Foundation Server Proxy computer, open Windows Explorer, and locate the proxy installation directory.

  2. Open Proxy.config in a text or XML editor.

  3. Locate the <CacheLimitPolicy> element.

  4. Select one of the following:

    • To specify a percentage of available disk space to fill before removing old files from the cache, update the <PercentageBasedPolicy> element.

      For example, the following line specifies that the cache should fill up to 60% capacity of available disk space before removing old files:

      <PercentageBasedPolicy>60</PercentageBasedPolicy>
      
    • To specify a fixed size in MB for the cache to reach before removing old files, add or update the <FixedSizeBasedPolicy> element.

      For example, the following line specifies that the cache should reach 500 MB before removing old files.

      <FixedSizeBasedPolicy>500</FixedSizeBasedPolicy>
      

      Note

      Both the <PercentageBasedPolicy> and <FixedSizeBasedPolicy> elements cannot be in effect at the same time.

  5. Save and close the Proxy.config file.

  6. On the proxy computer, on the Start menu, click Run, and type the following:

    IISRESET

    Performing this action retrieves the latest Proxy.config file.

To change the amount of cache to free when removing old files

  1. On the Team Foundation Server Proxy computer, open Windows Explorer, and locate the proxy installation directory.

  2. Open Proxy.config in a text or XML editor.

  3. Locate the <CacheDeletionPercent> element.

  4. Update the <CacheDeletionPercent> element by changing the percentage of cache space to free when removing old files.

    For example, the following line specifies to free 50% of the cache when removing old files.

    <CacheDeletionPercent>50</CacheDeletionPercent>
    
  5. Save and close the Proxy.config file.

  6. On the proxy computer, on the Start menu, click Run, and type the following:

    IISRESET

    Performing this action retrieves the latest Proxy.config file.

Changing the Interval for Saving Cache Performance Statistics

You can change the interval for saving cache performance statistics to an XML file named ProxyStatistics.xml. These statistics are tracked by performance counters that are installed by default. The ProxyStatistics.xml file is located in the App_Data folder in the proxy installation directory.

You can view these performance statistics from the Performance monitor or by using the ProxyStatistics Web service. For more information, see How to: Examine Cache Performance for Team Foundation Server Proxy.

To change the interval for saving performance statistics to a file

  1. On the Team Foundation Server Proxy computer, open Windows Explorer, and locate the proxy installation directory.

  2. Open the Proxy.config file in a text or XML editor.

  3. Locate the <StatisticsPersistTime> element.

  4. Update the <StatisticsPersistTime> element by changing the number of hours for each interval.

    Note

    The default and minimum interval is 1 hour. The maximum interval is 24 hours.

    For example, the following line specifies that 2 hours should pass between saving the statistics to a file:

    <StatisticsPersistTime>2</StatisticsPersistTime>
    
  5. Save and close the Proxy.config file.

  6. On the proxy computer, on the Start menu, click Run, and type the following:

    IISRESET

    Performing this action retrieves the latest Proxy.config file.

See Also

Tasks

How to: Configure Cache Security for Team Foundation Server Proxy

Concepts

Managing Remote Connections to Team Foundation Server Proxy