When my application loads, I pull out a JSON representation of 99 objects.
Each object has a "image_url" field, which I pass to AFNetworking setImageWithURLRequest .
Loading my images into a tableView, and therefore only the first few cells create queries for their images. This is not until I scroll down that subsequent image requests are made.
As soon as I pulled out the original dataset, I would like to start a background process that exits and loads 95 or so objects that were not initially visible, and cache them in such a way that when setImageWithURLRequest is setImageWithURLRequest , it will already have a cached image.
AFImageCache is private, though, so I'm not sure if this is possible. I know that I can cache NSURLCache, but then I would have two separate isolated caches, and this is also not ideal.
Is my only option not to use the AFNetworking UIImageView category?
These answers make me think like this:
iOS Image Caching Using AFImageCache Doesn't Work
How to configure cache when using setImageWithURL in AFNetworking
ios caching objective-c afnetworking nsurlcache
djibouti33
source share