Following are some of the frequently asked questions for BranchCache.

What is BranchCache?

BranchCache is a wide area network (WAN) bandwidth optimization technology that is included in some editions of the Windows Server® 2012 and Windows® 8 operating systems, as well as in some editions of Windows Server® 2008 R2 and Windows® 7. To optimize WAN bandwidth when users access content on remote servers, BranchCache retains content from your main office or hosted cloud content servers that has been accessed from branch office locations, allowing client computers at branch offices to access the content locally rather than over the WAN.

For more information, see BranchCache Overview.

How does BranchCache work?

Client computers in branch offices access content on servers that are located remotely – in your main office or in a cloud data center. After the client downloads a file, it stores the file in the local branch office – either in its own cache or on a hosted cache server, depending on whether you deploy distributed or hosted cache mode. After that, other clients that want to access the same file can access the local copy rather than downloading the file over the WAN link.

Does BranchCache actively push content to branch offices?

 No. Client computers in branch offices download content file by file, and then the files are cached locally.

With Windows Server 2012 and Windows 8, however, you can preload content in branch offices.

I want to use BranchCache. Should I use distributed cache mode or hosted cache mode?

For branch offices where you have client computers but do not have a server computer, use distributed cache mode. When you deploy BranchCache in distributed cache mode, the content cache at a branch office is distributed among client computers.

For branch offices where you do have a server computer, use hosted cache mode. When you deploy BranchCache in hosted cache mode, the content cache at a branch office is hosted on one or more server computers, which are called hosted cache servers.

You can also deploy hosted cache mode in some offices and distributed cache mode in others.

Do I have to deploy a Certification Authority (CA) and use certificates to deploy hosted cache mode?

You do not have to deploy a CA or certificates when your hosted cache server is running Windows Server 2012 and clients are running Windows 8. If your server is running Windows Server 2008 R2 or you have Windows 7 clients, however, you must configure the hosted cache server with a certificate.

If I use hosted cache mode, how many hosted cache servers can I deploy in a large branch office?

Clients running Windows 8 can discover and interact with an unlimited number of hosted cache servers running Windows Server 2012 per branch office. Windows Server 2008 R2 does not participate in discovery and relies on client configuration.  Windows 7 clients must be configured to use a particular hosted cache server, though there can be multiple such servers used in parallel, serving different groups of clients.

With Windows Server 2012 BranchCache, is hosted cache server data encrypted by default?

Yes. Hosted cache servers that are running Windows Server 2012 encrypt all data in the cache by default, so the use of additional encryption technologies is not required.

In a hosted cache environment where the hosted cache server is running Windows Server 2008 R2, the use of encryption technologies such as BitLocker or Encrypting File System (EFS) is advisable if any of the clients in the branch office can access sensitive data across the WAN link. It is also necessary to prevent physical access to the hosted cache, because disk encryption works only when the computer is turned off when the attacker gains physical access. If the computer is turned on or is in sleep mode, then disk encryption offers little protection.

Does BranchCache work with hybrid, private, and public cloud deployments?

Yes. Because BranchCache does not require new hardware or network topology changes, it is an excellent solution for improving communication between office locations and both public and private clouds, so you can place your BranchCache content servers in any cloud data center, whether it’s hybrid, private, or public.

Can I change the cache location on BranchCache clients and hosted cache servers?

Yes. On client computers that are running Windows 7 Enterprise or Windows 7 Ultimate, and on hosted cache servers that are running Windows Server 2008 R2, you can specify the cache location by using the following network shell (netsh) command:

 netsh branchcache set localcache directory=Drive:\Folder

For more information, see the Netsh Technical Reference topic Netsh Commands for BranchCache in Windows Server 2008 R2.

On client computers that are running Windows 8, and on hosted cache servers that are running Windows Server 2012, you can use either the netsh commands or the following Windows PowerShell cmdlet:

Set-BCCache -moveto Drive:\Folder

Note: If you are configuring a new BranchCache client or hosted cache server that does not yet have content in the distributed or hosted cache, you can specify a cache location other than the default by using the following cmdlet:

Set-BCCache -path Drive:\Folder

For more information, see BranchCache Cmdlets in Windows PowerShell.

Is there a way to pre-stage distributed and hosted cache content?

Yes, in some cases. Prehashing and preloading content is a new BranchCache feature for Windows Server 2012 and Windows 8.

For distributed cache mode, your content servers must be running Windows Server 2012, and your client computers must be running Windows 8. For hosted cache mode, your content servers and your hosted cache server must be running Windows Server 2012. For more information, see the BranchCache Deployment Guide topic Prehashing and Preloading Content on Hosted Cache Servers (Optional).

Is there a way to configure a cached file so that it never expires?

No. By default, cached contents are not removed from the cache for at least 28 days, unless deletion is required to make room for new content in the cache. Each time cached content is accessed by another client in the branch office, this 28 day expiration time is reset – so if a file is accessed frequently, the file might remain in the cache indefinitely.

In addition, for Windows Server 2012 and Windows 8, you can use the cmdlet Set-BCDataCacheEntryMaxAge to specify the maximum amount of time that data can remain in the cache. The expiration time for content that is already in the cache is not affected when you run this command; only content added after you run the command has the new expiration time. The maximum value for this setting is 4294967295 days (~ 11,767,034 years), however if a file is not accessed for a long time and the cache runs out of space, the file might be deleted from the cache to make room for new content. The following example sets the expiration time for 60 days:

Set-BCDataCacheEntryMaxAge -TimeDays 60

What are BranchCache hashes?

BranchCache processes the data on your content servers and creates hashes, which are also called content information. Because content information is created from multiple elements, the value of the content information is always unique. These elements are:

  • The actual content (such as Web pages or shared files) from which the hashes are derived.
  • Configuration parameters, such as the hashing algorithm and block size. To generate content information, the content server divides the content into segments and then subdivides those segments into blocks. BranchCache uses secure cryptographic hashes to identify and verify each block and segment, supporting the SHA256 hash algorithm.
  • A server secret. All content servers must be configured with a server secret, which is a binary value of arbitrary length.

Can the disk configuration for stored identifiers (such as the HashStorageLimitPercent registry value) be configured by a Netsh command or a Windows PowerShell cmdlet?

Yes, you can configure this value by using either Windows PowerShell or network shell (netsh):

Windows PowerShell: Set-BCCache –Percentage x

Netsh: netsh branchcache set cachesize size=x percent=true

Do I need to set the server secret?

By default, each content server will generate a random server secret.  This is typically appropriate.  However, when multiple content servers are serving identical content (e.g. DFS-R replication groups, clusters, etc.) the same server secret should be used on each content server.  Otherwise, each content server will generate different hashes for the same content, reducing the savings from BranchCache.

To set the server secret, use one of the following commands:

(netsh) netsh branchcache set key “My secret phrase”

 (Powershell) Set-BCSecretKey “My secret phrase”

What is the ratio of content size to hash size?

 In Windows 7 mode the ratio is 2000:1, and in Windows 8 mode the ratio is variable, but is still around the same. This ratio applies to files that are greater than or equal to 128 Kb. Because the size of the content information (which contains the hashes) cannot shrink below approximately 64 bytes, for files smaller than 128 Kb the ratio decreases.

Is it required that the Windows networking feature Network Discovery is enabled on client computers in order for WS-Discovery to work when the clients are in BranchCache distributed cache mode?

No. Network Discovery does not need to be enabled on client computers for BranchCache distributed cache mode to function correctly.