I use alamofireimage for loading images async and I use AutoPurgingImageCache for caching the loaded images (url request). I have a pull-to-refresh feature in my app and after I do that even if the app content remains the same I see that the app size is increasing and alamofire does not fetch the images from cache and instead it loads them from new requests. Profiling the app reveals that a memory issue exists in alamofire. I have attached the screen shot. I would appreciate if someone has some insight into this.
答案 0 :(得分:0)
您指定了什么缓存大小?您可能遇到缓存未命中,因为您每次刷新请求的不同图像数量足以填满整个缓存。
缓存密钥(即图像URL)也可能在刷新之间发生变化,这可能会阻止您的缓存机制正确查找缓存的图像。
AlamoFire肯定存在问题,但您应该首先检查一下上述问题的缓存设置。