Skip to content

Commit

Permalink
Bring back a forced cache update after an install to reduce timing im…
Browse files Browse the repository at this point in the history
…pacts of events
  • Loading branch information
JohnMcPMS committed Nov 5, 2023
1 parent d2bb559 commit aef1eb4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AppInstallerCLICore/Workflows/InstallFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "WorkflowBase.h"
#include "DependenciesFlow.h"
#include "PromptFlow.h"
#include "SourceFlow.h"
#include <AppInstallerMsixInfo.h>
#include <AppInstallerDeployment.h>
#include <AppInstallerSynchronization.h>
Expand Down Expand Up @@ -553,6 +554,7 @@ namespace AppInstaller::CLI::Workflow
Workflow::ReportExecutionStage(ExecutionStage::PostExecution) <<
Workflow::ReportARPChanges <<
Workflow::RecordInstall <<
Workflow::ForceInstalledCacheUpdate <<
Workflow::RemoveInstaller <<
Workflow::DisplayInstallationNotes;
}
Expand Down
6 changes: 6 additions & 0 deletions src/AppInstallerCLICore/Workflows/SourceFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,10 @@ namespace AppInstaller::CLI::Workflow
}
}
}

void ForceInstalledCacheUpdate(Execution::Context&)
{
// Creating this object is currently sufficient to mark the cache as needing an update for the next time it is opened.
Repository::Source ignore{ Repository::PredefinedSource::InstalledForceCacheUpdate };
}
}
6 changes: 6 additions & 0 deletions src/AppInstallerCLICore/Workflows/SourceFlow.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,10 @@ namespace AppInstaller::CLI::Workflow
// Inputs: SourceList
// Outputs: None
void ExportSourceList(Execution::Context& context);

// Forces an update to the cache of installed packages.
// Required Args: None
// Inputs: None
// Outputs: None
void ForceInstalledCacheUpdate(Execution::Context& context);
}

0 comments on commit aef1eb4

Please sign in to comment.