Closed markrickert closed 9 years ago
Why not value.to_s
?
I figured "%p" % self
runs self.inspect
and would be more reliable. Do you have an idea about an alternative method, @jamonholmgren?
If it works, fine with me. Using the url of the image as the cache key kind of makes sense, though, doesn't it?
Not really... there's an edge case where two different images request the same image almost simultaneously and it might overwrite the first operation with the new operation. I think it's safer to go based off the UIImageView requesting the image's memory address since we know there'll only be one image request per UIImageView.
... and when that same UIImageView requests a new remote image, we cancel it's previous image operation and start the new one.
WOOHOO! Specs passed. This is ready to go if you guys think it looks good @jamonholmgren @twerth @GantMan
:+1: :shipit:
:clap:
Moves from JMImageCache to SDWebImage.
Note my operation storage methodology of using the instance's memory address in a var. Any thought about a better way of doing this with
UIImageView
when we don't necessarily know where the image view is (like in a table cell or a collection view) and we can't invalidate it in theprepareForReuse
method of the cell?