Implement three simple policy for download data requests. I think it might be possible to replace all this code with a right configuration of NSURLRequest.

This commit is contained in:
Damiano Galassi committed 2013-12-20 14:53:24 +01:00
1 parent d9b7af3474
commit 1e6a4f57b3
8 files changed
+36 -25

No files matched your search

+1 -1
View File
@@ -69,7 +69,7 @@
self.version = 1;
// Get the data outside the main thread
dispatch_async(dispatch_get_global_queue(0, 0), ^{
self.data = [MetadataImporter downloadDataOrGetFromCache:_url];
self.data = [MetadataImporter downloadDataFromURL:_url withCachePolicy:SBDefaultPolicy];
self.version = 2;
// We got the data, tell the controller to update the view
dispatch_async(dispatch_get_main_queue(), ^{