Open adammeyer opened 5 years ago
For anyone else interested in removing the param, here is a hack I found:
autoUpdater.requestHeaders = { authorization: '' };
Could you please explain for what do you need cache if updater in any case need to get latest.yaml and then downloads update only if need?
We cache latest.yaml on our cdn for 20 minutes to reduce the load on our update server. The noCache param would never return a hit from the cdn.
If I make a PR adding a setting to make the noCache param optional, do you think that would get merged in? I feel like using the noCache param is hacky. The HTTP Cache-Control header should be used to control caching for http requests.
@adammeyer Do you use cloud front? Or custom server, so it is not possible to add exclusion by URL pattern?
I feel like using the noCache param is hacky. The HTTP Cache-Control header should be used to control caching for http requests
electron-updater and electron-builder is widely used. Even if for 5% it is useful, it should be so. Price — not working auto update if proxy server caches incorrectly.
I think having it on by default is fine. I would just like to see an option to turn it off if it's not needed or desired.
fwiw, I would also appreciate the ability to opt-out of noCache
– my releases are behind cloudflare for free caching, and we're making good use of etags from our host, so theres no reason for the requestor to manually invalidate. Yes, we can use an exclusion pattern, but configuring this in source is more transparent to other developers that may have to tinker with our deployment infra down the line.
How can I turn off the noCache query param? We are managing caching via the HTTP cache headers. It's a 'generic' update provider.