From bb71028fff2adf5ea91d215595220b6001029518 Mon Sep 17 00:00:00 2001 From: Ravi Patel Date: Fri, 7 Jun 2019 16:23:00 +0530 Subject: [PATCH] Now using NoCacheNoStore policy for all web client requests. --- AutoUpdater.NET/DownloadUpdateDialog.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/AutoUpdater.NET/DownloadUpdateDialog.cs b/AutoUpdater.NET/DownloadUpdateDialog.cs index 1f782d05..af745465 100644 --- a/AutoUpdater.NET/DownloadUpdateDialog.cs +++ b/AutoUpdater.NET/DownloadUpdateDialog.cs @@ -44,10 +44,7 @@ private void DownloadUpdateDialogLoad(object sender, EventArgs e) } else { - _webClient = new MyWebClient - { - CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore) - }; + _webClient = new MyWebClient(); if (AutoUpdater.BasicAuthDownload != null) { @@ -55,6 +52,8 @@ private void DownloadUpdateDialogLoad(object sender, EventArgs e) } } + _webClient.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore); + if (AutoUpdater.Proxy != null) { _webClient.Proxy = AutoUpdater.Proxy;