NSData dataWithContentsOfURL cache

前端 未结 1 1103
执笔经年
执笔经年 2021-02-08 16:27

NSData +dataWithContentsOfURL has any kind of caching by default? Has anyone experimented some kind of problems using this method, what is the most efficient way to get Data fro

1条回答
  •  后悔当初
    2021-02-08 17:19

    The documentation doesn't say that it will cache, so I think we should assume that they don't do any caching.

    Which kinds of data you want to get

    UIImage : yes, I think you should use NSData

    Video: you should use MPMoviePlayerController for streaming

    Text: I think you can do normal NSUrlConnection. It also has asynchronous, synchrnous and caching

    0 讨论(0)
提交回复
热议问题