大网数据广告活动
网络与域名解析

Move and Resize the Hosted Cache (Optional)

· 52CE 我爱测

Learn how to move the hosted cache to the drive and folder that you prefer, and to specify the amount of disk space that the hosted cache server can use for the hosted cache.

You can use this procedure to move the hosted cache to the drive and folder that you prefer, and to specify the amount of disk space that the hosted cache server can use for the hosted cache.

This procedure is optional. If the default cache location (%windir%\ServiceProfiles\NetworkService\AppData\Local\PeerDistPub) and size – which is 5% of the total hard disk space – are appropriate for your deployment, you do not need to change them.

You must be a member of the Administrators group to perform this procedure.

To move and resize the hosted cache

  1. Open Windows PowerShell with Administrator privileges.

  2. Type the following command to move the hosted cache to another location on the local computer, and then press ENTER.

    [!IMPORTANT] Before running the following command, replace parameter values, such as –Path and –MoveTo, with values that are appropriate for your deployment.

    Set-BCCache -Path C:\datacache –MoveTo D:\datacache
    
  3. Type the following command to resize the hosted cache –specifically the data cache - on the local computer. Press ENTER.

    [!IMPORTANT] Before running the following command, replace parameter values, such as -Percentage, with values that are appropriate for your deployment.

    Set-BCCache -Percentage 20
    
  4. To verify the hosted cache server configuration, type the following command and press ENTER.

    Get-BCStatus
    

    The results of the command display status for all aspects of your BranchCache installation. Following are a few of the BranchCache settings and the correct value for each item:

    • DataCache | CacheFileDirectoryPath: Displays the hard disk location that matches the value you provided with the –MoveTo parameter of the SetBCCache command. For example, if you provided the value D:\datacache, that value is displayed in the command output.

    • DataCache | MaxCacheSizeAsPercentageOfDiskVolume: Displays the number that matches the value you provided with the –Percentage parameter of the SetBCCache command. For example, if you provided the value 20, that value is displayed in the command output.

To continue with this guide, see Prehash and Preload Content on the Hosted Cache Server (Optional).

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 08/07/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。