Skip to content

Commit

Permalink
Add a debug setting to bypass the cache update to speed up...
Browse files Browse the repository at this point in the history
testing and decrease network traffic.
  • Loading branch information
DrewNaylor committed Oct 4, 2020
1 parent 058f40f commit 4151cf9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
3 changes: 3 additions & 0 deletions guinget/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<setting name="ExactMatchForLastSelectedIDSearch" serializeAs="String">
<value>True</value>
</setting>
<setting name="DebuggingBypassCacheUpdate" serializeAs="String">
<value>False</value>
</setting>
</guinget.My.MySettings>
</userSettings>
<runtime>
Expand Down
7 changes: 5 additions & 2 deletions guinget/MainWindow.vb
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,11 @@ Public Class aaformMainWindow

Friend Shared Async Function UpdatePackageListBuiltinAsync() As Task

' First, we need to download and update the manifests.
Await PackageListTools.UpdateManifestsAsync(My.Settings.Use7zipForExtraction, My.Settings.PathTo7zip, My.Settings.UseRobocopyForCopying, My.Settings.LoadFromSqliteDb)
' First, we need to download and update the manifests if the
' debugging setting to bypass updating is turned off.
If My.Settings.DebuggingBypassCacheUpdate = False Then
Await PackageListTools.UpdateManifestsAsync(My.Settings.Use7zipForExtraction, My.Settings.PathTo7zip, My.Settings.UseRobocopyForCopying, My.Settings.LoadFromSqliteDb)
End If

' We need to make sure the manifests are installed, otherwise this will look like it hangs.
Dim ManifestDir As String = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) & "\winget-frontends\source\winget-pkgs\pkglist\manifests"
Expand Down
12 changes: 12 additions & 0 deletions guinget/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions guinget/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,8 @@
<Setting Name="ExactMatchForLastSelectedIDSearch" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
<Setting Name="DebuggingBypassCacheUpdate" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>

0 comments on commit 4151cf9

Please sign in to comment.