Caching Images In Swift
Christopher Webb-Orenstein
1861

One interesting thing to note is that the caller of the downloadImage function might expect the result to come from a different runloop (assuming download happens in a background queue and the callback is called on the main queue). For consistency it might be good to wrap the cached completion block in a DispatchQueue.main.async {completion(…)}

Like what you read? Give Sergio Campamá a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.