Share via


IBackgroundCopyJob4::SetPeerCachingFlags method

Sets flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers.

Syntax

HRESULT SetPeerCachingFlags(
  [in] DWORD Flags
);

Parameters

  • Flags [in]
    Flags that determine if the files of the job can be cached and served to peers and if the job can download content from peers. The following flags can be set:

    Value Meaning
    BG_JOB_ENABLE_PEERCACHING_CLIENT 0x0001

    The job can download content from peers.

    The job will not download from a peer unless both the client computer and the job allow Delivery Optimization (DO) to download files from a peer. To enable the client computer to download files from a peer, set the EnablePeerCaching group policy.

    If one of the following conditions exists, DO will stop the download and reschedule the job to begin transferring from either a peer or the origin server, depending on the value for the job and the cache:

    • This value for the cache is TRUE and the value for the job toggles between TRUE and FALSE.
    • This value for the job property is TRUE and the value for the cache toggles between TRUE and FALSE.
    The download will then resume from where it left off before DO stopped the job.

    Note  This flag is deprecated.

    BG_JOB_ENABLE_PEERCACHING_SERVER 0x0002

    The files of the job can be cached and served to peers.

    DO will not cache the files and serve them to peers unless both the client computer and job allow DO to cache and serve the files. To allow DO to cache and serve the files on the client computer, set the EnablePeerCaching.

    Note  This flag is deprecated.

    BG_JOB_DISABLE_BRANCH_CACHE 0x0004

    DO will not use Windows BranchCache for transfer jobs. This setting does not affect the use of Windows BranchCache by applications other than DO.

     

Return value

The method returns the following values.

Return code Description
S_OK

Success

 

Remarks

Setting these flags has meaning only if the peer caching has been enabled by either setting the EnablePeerCaching group policy.

Requirements

Minimum supported client

Windows 10, version 1709 [desktop apps only]

Minimum supported server

Windows Server 2016 [desktop apps only]

Header

Deliveryoptimization.h

IDL

DeliveryOptimization.idl

Library

Dosvc.lib

DLL

Dosvc.dll

IID

IID_IBackgroundCopyJob4 is defined as 659cdeae-489e-11d9-a9cd-000d56965251

See also

IBackgroundCopyJob4

IBackgroundCopyJob4::GetPeerCachingFlags