/
/

How to Change the Delivery Optimization Max Cache Age for Updates in Windows 10

How to Change the Delivery Optimization Max Cache Age for Updates in Windows 10 blog banner image

Keeping all devices and apps in a network updated is a key step for stable environment performance. This involves ensuring that all necessary bug fixes, driver updates, and security patches are being applied. However, depending on the size of your organization, updating all devices at once could mean splitting the network bandwidth between updates and users, resulting in slower speeds and higher latency for everyone connected.

Microsoft’s delivery optimization enables peer-to-peer (P2P) distribution within an organization. This allows updates to be sourced from other devices in a network, eliminating the need to redownload the same update repeatedly. Updates downloaded on a device for P2P distribution stay cached until their max cache age lapses, at which point they become eligible for deletion.

Some would want their max cache age to retain updates longer, especially on update-host systems, while low-capacity devices need a shorter cache duration. This guide shows you how to change the Delivery Optimization max cache age setting and tailor update cache retention to meet your organization’s needs.

Configuring the maximum cache age for delivery optimization

To ensure a trouble-free configuration experience, ensure that you are running:

  • Windows 10 Home (or later) if you plan to implement this change using Registry Editor
  • Windows 10 Pro, Enterprise, or Education editions (or later) if you want to apply the change through Group Policy Editor

Before you proceed, go to Control Panel > User Accounts and verify that you have administrative privileges. You’ll need that to make changes using either of these Windows configuration tools.

Method 1: Configure using Group Policy

⚠️ Reminder: Before using the Local Group Policy Editor to configure the Max Cache Age policy setting for delivery optimization, we advise you to back up your Group Policy settings for an easy rollback in case something breaks.

Additionally, ensure that the value you set is appropriate to your organization’s needs. If it’s too high, delivery optimization caches can eat a significant portion of a device’s disk space; conversely, if it’s too low, it has the potential to limit your network’s P2P transfer efficiency.

Launch the Local Group Policy Editor

  1. Press Win + R to open Run.
  2. Type gpedit.msc, and then press Ctrl + Shift + Enter.

Inside the Local Group Policy Editor, follow the path:

Computer Configuration > Administrative Templates > Windows Components > Delivery Optimization.

Find and modify the policy setting

  1. Inside Delivery Optimization, locate and double-click Max Cache Age (in seconds).
  2. Click the dot beside Enabled, then set the Max Cache Age you prefer.

NOTE: This setting uses seconds as a measurement of time.

  1. By default, this value is set at 259200 (3 days).
  2. Refer to the table below for time values in seconds:Time Values in seconds
  3. Once your preferred value is set, select Apply and then OK.

Close the Local Group Policy Editor

  1. Exit the Local Group Policy Editor by closing the Window.
  2. As an optional step, you can refresh Group Policy settings by typing gpupdate /force using an elevated Command Prompt.

Method 2: Change delivery optimization cache using Registry Editor

⚠️ Keep in mind that even small mistakes in the registry can apply system-wide, which can lead to device instability and sluggish performance. Therefore, back up your registry before proceeding to edit the max cache age registry setting for delivery optimization.

Open the Registry Editor

  1. Launch the Run dialog box by pressing the Win + R hotkey.
  2. Inside the dialog box, type regedit, and press Ctrl + Shift + Enter.

Find the DeliveryOptimization key

  1. Navigate the path:
    • HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\DeliveryOptimization
  2. If DeliveryOptimization doesn’t exist, right-click the Windows key, select New, press Key, name it DeliveryOptimization, and then press Enter.

Find and edit the DWORD for Max Cache Age

  1. Inside DeliveryOptimization, double-click the DOMaxCacheAge DWORD value.
    • If there’s none, right-click DeliveryOptimization, click New, press DWORD (32-bit) Value, name it DOMaxCacheAge, and then hit Enter.
  2. In the pop-up window, select Decimal as the base of the DWORD value.
  3. Enter your preferred max cache age in seconds under Value data.
    • To use the default max cache age value (3 days), right-click DOMaxCacheAge and press Delete.
  4. Once you’re done, click OK to apply the changes.

Apply the registry changes

  1. Close the Registry Editor by pressing located on the window’s top-right.
  2. Reboot your system to apply the changes.

Recommendations and notes before configuring your max cache age

When configuring delivery optimization, it’s also crucial to set the correct max cache age to strike the perfect balance between network efficiency and disk space utilization in consideration of the environment’s capacity and needs. Below are key recommendations and things to note before tweaking your delivery optimization’s max cache age.

Delivery Optimization must be on

Max cache age only works if Delivery Optimization is enabled to download and cache content, such as Windows and Microsoft App updates. To verify if your delivery optimization cache is on, press Win + I to open Settings, press Update & Security, select Delivery Optimization, then set the switch below Allow downloads from other PCs to On.

Lower values to conserve disk space

Setting the max cache age to a lower value leads to the frequent deletion of delivery optimization cache files. Although this provides you with more disk space, it can cause multiple redownloads of the same update instead of a centralized P2P update distribution within an environment.

Higher values for large-scale settings

Setting a higher max cache age value is beneficial when distributing the same updates to a huge enterprise network. However, a bigger cache value equates to longer data purge intervals, which requires more disk space in the long run.

Combine with Max Cache Size settings

Consider improving upon the max cache age feature by supplementing it with max cache size and absolute max cache size settings. These settings can be found inside the Delivery Optimization node, and it allows you to set a hard limit on how much disk space delivery optimization caches are allowed to use.

Different use cases for delivery optimization and max cache age

Here are some scenarios where having both delivery optimization and max cache age configured can prove beneficial.

Shared lab environments

Imagine a computer laboratory with more than 100 Windows computers running similar configurations. Once an update is ready to roll, these computers will require the same files, and having a hundred devices compete for limited bandwidth can slow down the update process.

With delivery optimization enabled, the same updates can be reused and applied to all the devices in the same network. This reduces bandwidth requirements and improves the update speed across multiple devices.

A higher max cache age value would be ideal for this setup, as it allows longer caching of update files, increasing the chance it can be reused.

Remote branches with limited bandwidth

Some remote/branch offices (ROBOs) have slow internet connections due to their geographical locations. For instance, say there are 10 Windows computers in a remote office and all 10 of the Windows devices need a 2GB update.

Instead of simultaneously downloading 20GB worth of update files, one computer can download the whole update and share it with the network via its delivery optimization cache. This allows all devices in that remote environment to be up-to-date without consuming too much bandwidth.

Learn how to Limit Bandwidth to Download and Upload Windows and App Updates.

Virtual Desktop Infrastructure (VDI) environments

Virtual Desktop Infrastructure (VDI) environment allows users to access desktop sessions deployed from a centralized golden image. Without delivery optimization, every virtual machine connected to the server may individually download the same updates, leading to massive startup traffic and strain on network resources.

By utilizing delivery optimization paired and optionally leveraging persistent caching, you can significantly reduce bandwidth usage and improve overall boot performance across a VDI’s fleet of devices.

Improve delivery optimization by tweaking your max cache age

According to the use case of an enterprise or shared network environment, adjusting the max cache age provides better control over update delivery performance and storage use. You can adjust this setting using the Group Policy Editor if you’re using Windows 10 Pro, Enterprise, and Education editions. If you’re running Windows 10 Home or prefer an alternative method, you can also implement the change Registry Editor, which is available across all editions.

Set a high value on your environment’s cache age for better update file retention, enabling other devices to use the same updates to lessen bandwidth consumption. Remember that a higher max cache age value also means that the intervals between cache deletion are longer, which can consume a huge chunk of disk space in the long run. Therefore, you must configure the settings to provide balance between disk space and bandwidth management.

You might also like

Ready to simplify the hardest parts of IT?
×

See NinjaOne in action!

By submitting this form, I accept NinjaOne's privacy policy.

NinjaOne Terms & Conditions

By clicking the “I Accept” button below, you indicate your acceptance of the following legal terms as well as our Terms of Use:

  • Ownership Rights: NinjaOne owns and will continue to own all right, title, and interest in and to the script (including the copyright). NinjaOne is giving you a limited license to use the script in accordance with these legal terms.
  • Use Limitation: You may only use the script for your legitimate personal or internal business purposes, and you may not share the script with another party.
  • Republication Prohibition: Under no circumstances are you permitted to re-publish the script in any script library belonging to or under the control of any other software provider.
  • Warranty Disclaimer: The script is provided “as is” and “as available”, without warranty of any kind. NinjaOne makes no promise or guarantee that the script will be free from defects or that it will meet your specific needs or expectations.
  • Assumption of Risk: Your use of the script is at your own risk. You acknowledge that there are certain inherent risks in using the script, and you understand and assume each of those risks.
  • Waiver and Release: You will not hold NinjaOne responsible for any adverse or unintended consequences resulting from your use of the script, and you waive any legal or equitable rights or remedies you may have against NinjaOne relating to your use of the script.
  • EULA: If you are a NinjaOne customer, your use of the script is subject to the End User License Agreement applicable to you (EULA).