I am currently using Alamofireimage to download images, and my goal is to cache them after they are done. Since the images are static, once they are downloaded, they would not need to be downloaded again.
Alamofireimage documentation says that, when using the simple UIImageView
extension with af_setImage
, the image is automatically cached. My goal is (and I couldn't find in documentation) is how I could access this cache, and then cache this permanently to the app.
From the document here line 175 https://github.com/Alamofire/AlamofireImage/blob/master/Source/UIImageView%2BAlamofireImage.swift
This method af_setImage
will automatically find and load the image if you have it cached.
In this page, you can look at line 280 to manually access the cache.