From 554964f57c2a53502f0a2e3d95e30a377f6b3c8e Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Thu, 22 Jan 2026 17:10:50 -0800 Subject: [PATCH] Improves driver downloads by using cached links Reduces unnecessary Download Center requests by preferring cached file details when available Falls back to downloading/parsing the page only on cache miss, then backfills the cache for future runs Adds error handling and logging around cache load/update to avoid download failures from cache issues --- .../FFUUI.Core.Drivers.Microsoft.psm1 | 168 +++++++++++------- 1 file changed, 104 insertions(+), 64 deletions(-) diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Drivers.Microsoft.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Drivers.Microsoft.psm1 index 4475f4c..3fc216b 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.Drivers.Microsoft.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.Drivers.Microsoft.psm1 @@ -185,83 +185,123 @@ function Save-MicrosoftDriversTask { ### GET THE DOWNLOAD LINK $status = "Getting download link..." if ($null -ne $ProgressQueue) { Invoke-ProgressUpdate -ProgressQueue $ProgressQueue -Identifier $modelName -Status $status } - WriteLog "Getting download page content for $modelName from $modelLink" - $OriginalVerbosePreference = $VerbosePreference - $VerbosePreference = 'SilentlyContinue' - # Use passed-in UserAgent and Headers - $downloadPageContent = Invoke-WebRequest -Uri $modelLink -UseBasicParsing -Headers $Headers -UserAgent $UserAgent - $VerbosePreference = $OriginalVerbosePreference - WriteLog "Complete" - $status = "Parsing download page..." - if ($null -ne $ProgressQueue) { Invoke-ProgressUpdate -ProgressQueue $ProgressQueue -Identifier $modelName -Status $status } - WriteLog "Parsing download page for file" - $scriptPattern = '