Refresh the Data Caches on Client Computers
To prevent workspace errors from occurring during version control or build operations in Team Foundation, the data cache on client computers must be updated after certain maintenance operations. After you move, restore, rename, or fail over a data-tier or application-tier server or after you recover from a failure such as a hardware malfunction, you must refresh the cache for tracking work items and users must refresh the version control cache on client computers.
Required Permissions
To invoke the StampWorkitemCache Web method, you must be a member of the Administrators security group on the application-tier server for Team Foundation. For more information, see Team Foundation Server Permissions.
To use the tf workspaces command on the client computer, your Read permission must be set to Allow.
Refresh the Work Item Cache
Note
This procedure is optional. You should perform it only if errors occur with work item tracking.
To update the cache for tracking work items, you invoke the StampWorkitemCache Web method. This method forces client computers to update the cache the next time that they connect to the application-tier server. This method also synchronizes the workspaces that are defined on the client computers.
Note
When you invoke the StampWorkitemCache Web method, the performance of Visual Studio Team Foundation Server might temporarily degrade. The performance impact depends on how many Team Foundation users are connected when you invoke the method.
To refresh the cache for tracking work items on client computers
On the application-tier server, open Internet Explorer.
In the Address bar, type the following address to connect to the ClientService Web service. You can determine the address by opening the administration console, clicking Application Tier, and reviewing the addresses for Public URL and Virtual Directory:
http://PublicURL/VirtualDirectory:8080/WorkItemTracking/v3.0/ClientService.asmx
Note
Even if you are logged on with administrative credentials, you might need to start Internet Explorer as an administrator on a server that is running Windows Server 2008 by clicking Start, clicking All Programs, right-clicking Internet Explorer, and then clicking Run as administrator. For more information, see the Microsoft Web site.
Click StampWorkitemCache, and then click Invoke.
Note
The StampWorkitemCache method returns no data.
Refresh the Version Control Cache
To refresh the version control cache, each user runs the tf workspaces command on any computer that must be updated. They must update any computer that uses version control and that connects to a team project collection whose databases were relocated.
To refresh the version control cache on client computers
Log on to a computer that is running a client for Team Foundation and that uses version control.
Click Start, point to All Programs, point to Microsoft Visual Studio, point to Visual Studio Tools, and then click Visual Studio Command Prompt.
Note
Even if you are logged on with administrative credentials, you might need to open an elevated Command Prompt to perform this function on a server that is running Windows Server 2008 or Windows Vista. To open an elevated Command Prompt, click Start, right-click Command Prompt, and click Run as administrator. For more information, see the Microsoft Web site.
At the command prompt, type the following command, and provide the URL of the collection, which includes the server name and the port number of the application-tier server:
**tf workspaces /collection:http://**ServerName:Port/VirtualDirectory/CollectionName
For example, if you wanted to refresh the version control cache for a project that is a member of the ContosoMain collection, which is hosted in the Contoso1 deployment of Team Foundation Server, you would type the following string:
tf workspaces /collection:http://Contoso1:8080/tfs/ContosoMain
For more information, see the Workspaces Command.
See Also
Tasks
Open the Team Foundation Administration Console
Restore Data to the Same Location
Move from a Single-Server to a Dual-Server Deployment