0

对于 iOS 5.0 和 arc,我需要确保 NSURLConnection sendSynchronousRequest 不缓存响应数据。我将如何设置委托以便我可以实现以下方法

- (NSCachedURLResponse *)connection:(NSURLConnection *)connection willCacheResponse:(NSCachedURLResponse *)cachedResponse 
4

1 回答 1

3

尝试

    [[NSURLRequest alloc] initWithURL:[NSURL URLWithString:URL]
                          cachePolicy:NSURLRequestReloadIgnoringLocalAndRemoteCacheData
                      timeoutInterval:60.0];
于 2012-05-09T13:13:41.870 回答