-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caching Live Photos #62
Comments
By default, Nuke relies only on HTTP caching implemented in Cocoa for on-disk caching. I've written a comprehensive guide on this topic. If custom on-disk caching is required than take a look at public protocol ImageDiskCaching {
func setData(data: NSData, response: NSURLResponse, forTask task: ImageTask)
func dataFor(task: ImageTask) -> NSData?
func removeAllCachedImages()
} See |
I'm not aware of the details related to live photos. If there are some specific requirements please let me know. |
Sure! First of all I love Nuke and would prefer to use it for everything, this being my number one motivation for hoping a future build could handle Extremely possible
The actual However, Obviously it is very easy to instantiate a
And here is where it gets tricky. I use an I now need to create a The only method to instantiate a live photo from the .jpeg and .mov data is this:
Where So far the solution for me is:
Now I can now use
I'm in the process of building a simple caching system. End goal is to extend PHLivePhotoView to have similar functionality to
|
Thanks, I'll take a look later today. From the first impression, it does seem quiet complicated. My first thought was to create a custom UIView subclass that would request .jpg and .mov via separate tasks (why make user wait for a .mov?). Nuke already supports .jpg. And I think @mitchellporter has already tricked Nuke into supporting .mov files. |
Caching live photos that are downloaded actually requires storing these photos on the disk.
Nuke will be the most robust caching system I am aware of if its able to handle all this for you
The text was updated successfully, but these errors were encountered: