I use AlamofireImage
in conjunction with PromiseKit
and Alamofire
. I use promises to chain the download of x number of images since I want to do this synchronically. I can't seem to understand if ImageDownloader()
caches automatically or if I have to add the image explicitly to the cache? The only examples I've seen so far are not using the ImageDownloader
so I have a real hard time finding an answer to this.
If not - how do I add it the cache? I've tried using:
self.imageDownloader.imageCache?.addImage(image, withIdentifier: imageUrl)
But all it does is increase my memory usage for all eternity(i.e. adding the same image to the cache over and over)