1

I am really hoping someone here has already done the homework and is willing to share a bit.

I need to cache images obtained from the server. The images are to be displayed in tables. Right now now each time I scroll new images are (re-)obtained from the server. Also when I leave a table to go to another, when I return all the images are loaded again. So basically I have no caching mechanism presently.

I am looking online for some good libraries/projects. I find a number of libraries but of course I don't know which ones are good and which ones are great. So, does anyone know which projects/libraries are great to use for image caching on iOS? I am hoping for robustness and ease of implementation.

By ease of use I mean I am hoping not to have to learn a bunch of things just to implement the library/project.

My app is presently targeting iOS7 and up

learner
  • 11,490
  • 26
  • 97
  • 169
  • I wonder how https://github.com/hpique/Haneke might compare against AFNetworking's image caching? What do the experts say? This thread is promising, as I have wondered the same at times. – Konsol Labapen Aug 25 '14 at 23:23
  • SDWebImage may be the least buggy. But I don't know. I haven't used it yet. Someone with better expertise should definitely help out. – Katedral Pillon Aug 26 '14 at 00:19

1 Answers1

1

You already know what you need. NSCache is what you're looking for.

But if you're looking for additional help with Networking and image caching combined, you should check out AFNetworking. Very handy when working with lots of images and network requests. (Hint: it already has an NSCache implemented)

Tommy Devoy
  • 13,441
  • 3
  • 48
  • 75
  • Thanks, I will look into AFNetworking for caching. I didn't know they had image caching capabilities. +1. Are you aware of any project that uses them for caching? Or if you had experience with them, is it buggy? difficult to implement or deal with? I am hoping the collective experience here can save me some trouble. – learner Aug 25 '14 at 22:41
  • Yeah it's in several notable apps if you research it. It's pretty good overall. Seen a couple small issues, but those were mostly specific to my own needs. Implementing your own NSCache is not very difficult though. It's basically just like an NSDictionary, which you purge when your memory limit hits a certain threshold. – Tommy Devoy Aug 25 '14 at 22:47