rs/SDWebImage — pull request #644 by kencoken (2014-02-27 21:14:54+00:00)
Title: Added method to SDWebImageManager to check if an image exists in either ...

Currently SDWebImageManager contains the method `-diskImageExistsForURL:` which checks whether a given image exists in the disk cache synchronously.

However, it is often useful in custom code to check to see whether a given image exists in *either* the disk *or* the memory cache before starting a `downloadWithUrl:` operation.

This is as simple as calling `[manager.imageCache imageFromMemoryCacheForKey:key]` and checking for a nil result, but doing this outside `SDWebImageManager` requires bypassing any cacheKeyFilters in the instance, and parsing the URL manually into a key.

Therefore, I've added a very small utility function that checks for the presence of the image in the disk *or* memory cache, mirroring the existing `-diskImageExistsForURL:` function exactly, but adding an additional check of the memory cache.

Please let me know if you think there are better ways to do this, or there is a reason why there was no combined check utility method previously, but it was a small and useful modification which I found useful, so thought I'd submit a pull request in case it was helpful.