diff --git a/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs b/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs index b0efa34fb..5866bb898 100644 --- a/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs +++ b/Source/ChocolateyGui.Common.Windows/Services/ChocolateyService.cs @@ -253,6 +253,11 @@ public async Task InstallPackage( config.DownloadChecksum64 = advancedInstallOptions.DownloadChecksum64bit; config.DownloadChecksumType = advancedInstallOptions.DownloadChecksumType; config.DownloadChecksumType64 = advancedInstallOptions.DownloadChecksumType64bit; + + if (advancedInstallOptions.IgnoreCached) + { + config.CacheExpirationInMinutes = 0; + } } }); diff --git a/Source/ChocolateyGui.Common.Windows/ViewModels/AdvancedInstallViewModel.cs b/Source/ChocolateyGui.Common.Windows/ViewModels/AdvancedInstallViewModel.cs index c6cabffc1..0c5642f25 100644 --- a/Source/ChocolateyGui.Common.Windows/ViewModels/AdvancedInstallViewModel.cs +++ b/Source/ChocolateyGui.Common.Windows/ViewModels/AdvancedInstallViewModel.cs @@ -42,6 +42,7 @@ public class AdvancedInstallViewModel : ObservableBase, IClosableChildWindow + + + diff --git a/Source/ChocolateyGui.Common/Models/AdvancedInstall.cs b/Source/ChocolateyGui.Common/Models/AdvancedInstall.cs index ae9e89d08..dffa4ac31 100644 --- a/Source/ChocolateyGui.Common/Models/AdvancedInstall.cs +++ b/Source/ChocolateyGui.Common/Models/AdvancedInstall.cs @@ -39,6 +39,8 @@ public class AdvancedInstall public bool SkipPowerShell { get; set; } + public bool IgnoreCached { get; set; } + public bool IgnoreChecksums { get; set; } public bool AllowEmptyChecksums { get; set; } diff --git a/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs b/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs index 393bacee0..d50b198c0 100644 --- a/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs +++ b/Source/ChocolateyGui.Common/Properties/Resources.Designer.cs @@ -1,4 +1,4 @@ -//------------------------------------------------------------------------------ +//------------------------------------------------------------------------------ // // This code was generated by a tool. // Runtime Version:4.0.30319.42000 @@ -393,6 +393,24 @@ public static string AdvancedChocolateyDialog_Forcex86_ToolTip { } } + /// + /// Looks up a localized string similar to Ignore Cached. + /// + public static string AdvancedChocolateyDialog_IgnoreCached_Header { + get { + return ResourceManager.GetString("AdvancedChocolateyDialog_IgnoreCached_Header", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Ignore any previously cached http resources. + /// + public static string AdvancedChocolateyDialog_IgnoreCached_ToolTip { + get { + return ResourceManager.GetString("AdvancedChocolateyDialog_IgnoreCached_ToolTip", resourceCulture); + } + } + /// /// Looks up a localized string similar to Ignore Checksums. /// diff --git a/Source/ChocolateyGui.Common/Properties/Resources.resx b/Source/ChocolateyGui.Common/Properties/Resources.resx index fc7e926fa..40fe2f0ef 100644 --- a/Source/ChocolateyGui.Common/Properties/Resources.resx +++ b/Source/ChocolateyGui.Common/Properties/Resources.resx @@ -1377,4 +1377,10 @@ Please contact your System Administrator to enable this operation. Browse This text is used for both when a user clicks a button supposed to select a file, and when selecting a folder. - + + Ignore Cached + + + Ignore any previously cached http resources + + \ No newline at end of file