0

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.

Profiling information

Kevin R
  • 8,230
  • 4
  • 41
  • 46

1 Answers1

0

What cache size did you specify? It's possible that you're experiencing cache misses because the number of distinct images you request per-refresh is more than large enough to fill up the entire cache.

It's also possible that the cache key, i.e. image URL, is changing between refreshes, which could prevent your caching mechanism from correctly looking up cached images.

It's certainly possible there's a problem with AlamoFire, but you should probably start by examining your caching setup for problems like the above.

aednichols
  • 2,292
  • 2
  • 19
  • 28