cloudinary / cloudinary_ios

Cloudinary iOS SDK
MIT License
165 stars 106 forks source link

Download request: Determine if an image is cached #162

Closed crspybits closed 5 years ago

crspybits commented 6 years ago

I am using the Cloudinary iOS SDK and would like to (a) display a spinner for a minimum duration (say, 2 seconds) if an image download request hits the network, or (b) display no spinner if the image download request hits local cache. This seems a little tricky with the current interface.

Any ideas? My best thought at the moment is that if the download request takes more than say a few milliseconds, then start a spinner. Seems hacky though. The underlying code knows if the request is hitting cache. Would you consider a PR to change this behavior? Thanks.

shirlymanor commented 6 years ago

Hey, I apologize for the very late reply. Currently, our API doesn't support it. I've forward your request to our product team for consideration. We are welcoming external PRs. you can create it and will try our best to merge it.