nsurlrequestcachepolicy

NSURLRequest cache issue iOS 7

﹥>﹥吖頭↗ 提交于 2019-12-12 09:41:30
问题 in iOS 7 cachePolicy doesn't work, it just cache the downloaded json. //URLRequest NSString *url = [NSString stringWithFormat:@"http://www.semhora.com/jsonparser/categories/categories_%d_test.json", _categoriesIndex]; NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:60.0]; How can I disallow cache in iOS 7? 回答1: I encountered the same problem and I verified that setting cachePolicy = 0 instead of

NSMutableURLRequest returns old values even cachePolicy is NSURLCacheStorageNotAllowed

﹥>﹥吖頭↗ 提交于 2019-12-12 03:09:54
问题 Im using codes posted here: connection release method in connectionDidFinishLoading, causes error now first execute returns didFail log. second execute; returns old response data. albeit my (localhost) server is totally offline. and cachePolicy is NSURLCacheStorageNotAllowed (check the code on the link I posted above) NSMutableURLRequest *request= [NSMutableURLRequest requestWithURL:url cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:3.0f]; the response data seems cached somewhere and

NSURLRequest cache issue iOS 7

醉酒当歌 提交于 2019-12-05 16:59:28
in iOS 7 cachePolicy doesn't work, it just cache the downloaded json. //URLRequest NSString *url = [NSString stringWithFormat:@"http://www.semhora.com/jsonparser/categories/categories_%d_test.json", _categoriesIndex]; NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL URLWithString:url] cachePolicy:NSURLCacheStorageNotAllowed timeoutInterval:60.0]; How can I disallow cache in iOS 7? I encountered the same problem and I verified that setting cachePolicy = 0 instead of cachePolicy = NSURLCacheStorageNotAllowed fixes the problem. This doesn't make sense to me either since 0 corresponds