在托管的缓存服务器上预哈希和预加载内容(可选)Prehashing and Preloading Content on Hosted Cache Servers (Optional)

适用于:Windows Server(半年频道)、Windows Server 2016Applies to: Windows Server (Semi-Annual Channel), Windows Server 2016

您可以使用此过程来强制创建内容信息(也称为哈希),启用 BranchCache 的 Web 和文件服务器。You can use this procedure to force the creation of content information - also called hashes - on BranchCache-enabled Web and file servers. 你还可以将文件和 web 服务器上的数据收集到可传输到远程托管缓存服务器的包中。You can also gather the data on file and web servers into packages that can be transferred to remote hosted cache servers. 这使你能够在远程托管缓存服务器上预加载内容,使数据可供第一次客户端访问。This provides you with the ability to preload content on remote hosted cache servers so that data is available for the first client access.

你必须是管理员的成员或等效于执行此过程。You must be a member of Administrators, or equivalent to perform this procedure.

Prehash 内容并在托管缓存服务器上预加载内容To prehash content and preload the content on hosted cache servers

  1. 登录到包含要预加载的数据的文件或 Web 服务器,并标识要在一个或多个远程托管缓存服务器上加载的文件夹和文件。Log on to the file or Web server that contains the data that you wish to preload, and identify the folders and files that you wish to load on one or more remote hosted cache servers.

  2. 以管理员身份运行 Windows PowerShell。Run Windows PowerShell as an Administrator. 对于每个文件夹和文件,请运行 Publish-BCFileContent 命令或 Publish-BCWebContent 命令,具体取决于内容服务器的类型,用于触发哈希生成并向数据包添加数据。For each folder and file, run either the Publish-BCFileContent command or the Publish-BCWebContent command, depending on the type of content server, to trigger hash generation and to add data to a data package.

  3. 将所有数据添加到数据包后,请使用命令生成数据包文件,将其导出 Export-BCCachePackageAfter all the data has been added to the data package, export it by using the Export-BCCachePackage command to produce a data package file.

  4. 使用所选的文件传输技术将数据包文件移动到远程托管缓存服务器。Move the data package file to the remote hosted cache servers by using your choice of file transfer technology. FTP、SMB、HTTP、DVD 和便携式硬盘均为可行传输。FTP, SMB, HTTP, DVD and portable hard disks are all viable transports.

  5. 使用命令导入远程托管缓存服务器上的数据包文件 Import-BCCachePackageImport the data package file on the remote hosted cache servers by using the Import-BCCachePackage command.