I have the following code, it works fine in iOS7, but not in iOS8.In iOS8, the application always uses the cache, even I set NSURLRequestReloadIgnoringCacheData:
NSURL *url = [NSURL URLWithString:k_Chapter_URL]; NSMutableURLRequest* request = [[NSMutableURLRequest alloc] initWithURL:url]; NSURLSessionConfiguration *sessionConfig = [NSURLSessionConfiguration defaultSessionConfiguration]; sessionConfig.requestCachePolicy = NSURLRequestReloadIgnoringCacheData; NSURLSession *session = [NSURLSession sessionWithConfiguration:sessionConfig]; [[session dataTaskWithRequest:request completionHandler:^(NSData *data, NSURLResponse *response, NSError *error) { }] resume];
Do I have a similar situation?
source share