seatgeek/SGImageCache — pull request #5 by dbachrach (2014-09-26 18:36:18+00:00)
Title: PromiseKit Integration. stillValid addition to UIImageView+SGImageCache. moveToSlowQueue improvement.

Hey guys. Awesome library. Been working on a few improvements and wanted to get your eyes on them.

PromiseKit Integration- Allows you to do:

```objc
__weak typeof(self) me = self;
[SGImageCache getImageForURL:url].then(^(UIImage *image) {
me.imageView.image = image;
});
```

stillValid- We kick off some UIImageView setImage calls in our collection view cells, which can then be reused. I've added a stillValid block which gets executed after the image is downloaded to check if we the image should be set on the image view.

moveToSlowQueue- It looks like when you call moveToSlowQueue, if there is not a task in the fast queue or in the slow queue it creates one in the slow queue. This seems unnecessary. Instead, I first check if there is an item in the fast queue, and only then move it to the slow queue.

cachedImageURL- This doesn't seem to work for UIImageViews that are not SGImageViews. I've removed it, but can add it back with explanation on its purpose?

Thanks again!