The problem is NSURLCache not caching https url requests. I checked it by
[NSURLCache sharedURLCache];
NSURLRequest *request = [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:@"https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-prn2/703666_3663940170939_253924330_o.jpg"]];
NSCachedURLResponse *cachedResponse = [[NSURLCache sharedURLCache] cachedResponseForRequest:request];
NSLog(cachedResponse ? @"Cached response found!" : @"No cached response found.");
[NSURLConnection sendSynchronousRequest:request returningResponse:NULL error:NULL];
Now i let NSURLConnection to load the file, close my app, and run again. It always shows No cached response found. But if i simply change https to http in the same url, it works, cache is saved.
Any idea how to make it save https too ?