开发者

File backed UIImageView vs. NSURL Cache Control Policies

开发者 https://www.devze.com 2023-01-13 05:41 出处:网络
I am working on an image heavy iPad app. We implemented our own table view-esque control which reuses UIImageViews as a user scrolls the screen. To reduce network calls and make it perform better, I i

I am working on an image heavy iPad app. We implemented our own table view-esque control which reuses UIImageViews as a user scrolls the screen. To reduce network calls and make it perform better, I implemented a file backed UIImageView that writes the loaded i开发者_运维百科mages to the NSTemporaryDirectory and checks that before making a call to get a new image.

I should have looked at this before but I was later pointed to the different NSURLRequest Cache Policies.

My question is, is there any reason my custom file cache could perform better than the default cache?


From what I gather the iOS cache is memory only, so your homebrew cache will work better across app starts.

0

精彩评论

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