开发者

How to implement a cache for web resources? NSURLRequest cache or disk caching?

开发者 https://www.devze.com 2023-01-03 14:01 出处:网络
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

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

0

精彩评论

暂无评论...
验证码 换一张
取 消