Administering the Peer Cache
If the group policy settings are not configured, an application can call the IBitsPeerCacheAdministration::SetConfigurationFlags method to set the peer caching preference for the computer. Note that these preferences are overridden by the group policy settings if they are set later. To determine if the computer enables peer caching, call the IBitsPeerCacheAdministration::GetConfigurationFlags method.
If peer caching is enabled, BITS will only cache the contents of a job if the job explicitly allows its content to be cached. BITS will also only download content from a peer if the job explicitly allows it. To enable peer caching for a job, call the IBackgroundCopyJob4::SetPeerCachingFlags method.
In addition to using Group Policy or the IBitsPeerCacheAdministration interface to enable peer caching, you can also use either method to change the default cache size and length of time that a non-accessed file remains in the cache. To change the defaults using the IBitsPeerCacheAdministration interface, call the SetMaximumCacheSize and SetMaximumContentAge methods. Since these methods set the preference settings, they are overridden by the group policy settings.
To list the peers from whom BITS will try to download content, call the IBitsPeerCacheAdministration::EnumPeers method.
To list the files in the cache that BITS will serve to peers, call the IBitsPeerCacheAdministration::EnumRecords method.
You should never have to manage the peer cache with regards to discovering peers or deleting cache records. This functionality was included in the IBitsPeerCacheAdministration interface for completeness.