mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 04:53:28 +02:00
Don't cache when fetching Thunder's build info
I was mistaken when I added the EphemeralSession to stop local caching. Using an EphermeralSession doesn't stop Foundation from caching a request. Setting a request cache policy controls caching.
This commit is contained in:
parent
c4c29dd093
commit
b8d2e73cf7
1 changed files with 2 additions and 3 deletions
|
@ -26,9 +26,8 @@
|
|||
[request setValue:@USER_AGENT_STRING forHTTPHeaderField:@"User-Agent"];
|
||||
[request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"];
|
||||
|
||||
// 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) {
|
||||
request.cachePolicy = NSURLRequestReloadIgnoringLocalCacheData;
|
||||
NSURLSessionDataTask* dataTask = [NSURLSession.sharedSession dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) {
|
||||
NSLog(@"Latest Build Request error: %@", error);
|
||||
NSLog(@"Latest Build Request Data: %@", data);
|
||||
NSHTTPURLResponse* ne = (NSHTTPURLResponse *)response;
|
||||
|
|
Loading…
Reference in a new issue