mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 13:12:39 +02:00
Never cache the tags API in macOS's HQ Launcher
Prior to this change we used the default session while downloading the latest tags API response from Thunder. This left open the possibility that NSURLSession could cache the response, even though the server asked it not to; NSURLSession can be pretty aggressive about its caching. This change ensure no caching of the API is occurring my using an ephemeral session when calling the tags API.
This commit is contained in:
parent
4d28c5fe41
commit
4f6e2c85f9
1 changed files with 2 additions and 2 deletions
|
@ -23,8 +23,8 @@
|
|||
[request setHTTPMethod:@"GET"];
|
||||
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||
|
||||
|
||||
NSURLSession* session = [NSURLSession sharedSession];
|
||||
// We're using an ephermeral session here to ensure the tags api response is never cached.
|
||||
NSURLSession * session = [NSURLSession sessionWithConfiguration:NSURLSessionConfiguration.ephemeralSessionConfiguration];
|
||||
NSURLSessionDataTask* dataTask = [session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue