I'm trying to get a JSON file from a server then display it in a table, this works fine, however, for some reason AFNetworking is caching the JSON file even after a app restart. How can I disable this?
NSURL *url = [NSURL URLWithString:@"http://?json"];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
AFJSONRequestOperation *operation = [AFJSONRequestOperation
JSONRequestOperationWithRequest:request
success:^(NSURLRequest *request, NSHTTPURLResponse *response, id responseObject)
{
self.dataget = [responseObject objectForKey:@"data"];
[self.tableView reloadData];
}
failure:^(NSURLRequest *request, NSHTTPURLResponse *response, NSError *error, id responseObject)
{
[HUD hideUIBlockingIndicator];
}];
[operation start];
The json file is probably not cached server side:
Cache-Control: no-cache[CRLF]