I have a tableview and each row has an icon.
90% of the rows have the same icon.
In the cellForRowAtIndexPath method I load the image from an assets folder like this:
var cellImage = UIImage(named: "MyImage")
named: API actually DOES do some kind of caching.
If you look at UIImage's documentation, it states:
init(named:in:compatibleWith:)method (or the
init(named:)method) to create an image from an image asset or image file located in your app’s main bundle (or some other known bundle). Because these methods cache the image data automatically, they are especially recommended for images that you use frequently.