Too Long; Didn't Read
To get image caching in Swift isn’t too hard. But why do it yourself with NSCache when you can just do it with a framework? A simple Google search for caching on Swift brings you to Kingfisher and Nuke. Which are both frameworks for caching. But I like to use native whenever I can. It helps me understand at a deeper level what is going on, especially when you look into these frameworks. I noticed that what they use is also NSCache. So let’s get started.