Open in the explorer

Set age for segments in the data cache

Définir l’âge des segments dans le cache de données

Type
Computer
GPO path
Computer Configuration › Policies › Administrative Templates › Network › BranchCache FR: Configuration ordinateur › Stratégies › Modèles d'administration › Réseau › BranchCache
Supported on
At least Windows Server 2012, Windows 8 or Windows RT FR: Au minimum Windows Server 2012, Windows 8 ou Windows RT
ADMX file
PeerToPeerCaching.admx
Internal name
PeerToPeerCaching/SetDataCacheEntryMaxAge

Explanation

This policy setting specifies the default age in days for which segments are valid in the BranchCache data cache on client computers.

If you enable this policy setting, you can configure the age for segments in the data cache.

If you disable or do not configure this policy setting, the age is set to 28 days.

Policy configuration

Select one of the following:

- Not Configured. With this selection, BranchCache client computer cache age settings are not applied to client computers by this policy. In the circumstance where client computers are domain members but you do not want to configure a BranchCache client computer cache age setting on all client computers, you can specify Not Configured for this domain Group Policy setting, and then configure local computer policy to enable BranchCache client computer cache age settings on individual client computers. Because the domain Group Policy setting is not configured, it will not over-write the client computer cache age setting that you use on individual client computers.

- Enabled. With this selection, the BranchCache client computer cache age setting is enabled for all client computers where the policy is applied. For example, if this policy setting is enabled in domain Group Policy, the BranchCache client computer cache age that you specify in the policy is turned on for all domain member client computers to which the policy is applied.

- Disabled. With this selection, BranchCache client computers use the default client computer cache age setting of 28 days on the client computer.

In circumstances where this setting is enabled, you can also select and configure the following option:

- Specify the age in days for which segments in the data cache are valid.

French text from Windows 11 26H2

Ce paramètre de stratégie spécifie l’âge par défaut, en jours, des segments pour qu’ils soient valides dans le cache de données BranchCache sur les ordinateurs client.

Si vous activez ce paramètre de stratégie, vous pouvez configurer l’âge des segments dans le cache de données.

Si vous désactivez ou ne configurez pas ce paramètre de stratégie, l’âge est défini sur 28 jours.

Configuration de la stratégie

Sélectionnez l’une des valeurs suivantes :

- Non configuré. Avec cette sélection, les paramètres d’âge du cache de l’ordinateur client BranchCache ne sont pas appliqués par cette stratégie aux ordinateurs client. Si les ordinateurs client sont membres du domaine, mais que vous ne voulez pas configurer de paramètre d’âge du cache de l’ordinateur client BranchCache sur tous les ordinateurs client, vous pouvez spécifier Non configuré pour ce paramètre de stratégie de groupe du domaine, puis configurer la stratégie de l’ordinateur local pour activer les paramètres d’âge du cache de l’ordinateur client BranchCache sur des ordinateurs client individuels. Puisque le paramètre de stratégie de groupe de domaine n’est pas configuré, il ne remplace pas le paramètre d’âge du cache de l’ordinateur client que vous utilisez sur les ordinateurs client individuels.

- Activé. Avec cette sélection, le paramètre d’âge du cache de l’ordinateur client BranchCache est activé pour tous les ordinateurs client auxquels la stratégie est appliquée. Par exemple, si ce paramètre de stratégie est activé dans la stratégie de groupe du domaine, l’âge du cache de l’ordinateur client BranchCache que vous spécifiez dans la stratégie est activé pour tous les ordinateurs client membres du domaine auxquels la stratégie est appliquée.

- Désactivé. Avec cette sélection, les ordinateurs client BranchCache utilisent le paramètre d’âge du cache de l’ordinateur client par défaut, à savoir 28 jours sur l’ordinateur client.

Lorsque ce paramètre est activé, vous pouvez également sélectionner et configurer l’option suivante :

- Spécifier l’âge de validité, en jours, des segments du cache de données.

Registry

HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\PeerDist\Retrieval
Value name
not defined in the ADMX

Enable / disable values: not defined in the ADMX (see the options below).

PowerShell

PowerShell commands that write to the registry what the policy would write. Values in angle brackets (<…>) must be replaced.

Writing directly to the registry bypasses Group Policy: if a GPO manages this value, it will be rewritten at the next gpupdate; otherwise the value stays in place (the "tattooing" effect). Prefer a GPO or, locally, LGPO.exe. Run PowerShell as administrator for HKLM. Some policies need a restart or gpupdate /force.

Enable

# Enable: PeerToPeerCaching/SetDataCacheEntryMaxAge
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PeerDist\Retrieval'
if (-not (Test-Path -Path $k)) { New-Item -Path $k -Force | Out-Null }
#
Set-ItemProperty -Path $k -Name 'SegmentTTL' -Value 28 -Type DWord

Disable

# Disable: PeerToPeerCaching/SetDataCacheEntryMaxAge
# No value is written in the "Disabled" state (nothing defined in the ADMX)

Revert to "Not configured"

# Revert to "Not configured": PeerToPeerCaching/SetDataCacheEntryMaxAge
$k = 'HKLM:\SOFTWARE\Policies\Microsoft\PeerDist\Retrieval'
Remove-ItemProperty -Path $k -Name 'SegmentTTL' -ErrorAction SilentlyContinue

Options (1)

LabelControlRegistry valueREG typeConstraints / details
WBC_Cache_MaxAge_dctxtboxNumeric boxdecimalSegmentTTLREG_DWORD
Default (UI): 28

Availability