How to implement a cache for web resources? NSURLRequest cache or disk caching?
I have several UITableViews that asynchronously load the images, video, and text from the internet using NSURLRequest and NSURLConnection (Think s开发者_运维技巧imilar to NYTimes app). That works fine. Currently the content isn't cached. I don't need offline access but just want to cache to speed up performance.
What would be best:
- Using NSURLRequest and cachePolicy?
- Saving the images and videos to disk (what about metadata)? How would I store text?
I used the code here: http://github.com/rs/SDWebImage
精彩评论