I am doing a connection to the NSURL and I need to create a request to bypass all the cache policy. I have seen examples such as :
NSURLRequest *request = [NSURLRequest requestWithURL:baseURL cachePolicy:0 timeoutInterval:10];
self.urlConnection = [[[NSURLConnection alloc] initWithRequest:request delegate:self] autorelease];
May I ask what does the cache policy 0 refers to? Have tried searching for what the number represents but I’m not getting any answer I need. Thanks! 🙂
you should have a look at NSURLRequestCachePolicy enum, here 0 mean is NSURLRequestUseProtocolCachePolicy, that means NSURLRequest would not load data from server every time.