The most underrated Objective-C Class(stephenbalaban.com)
stephenbalaban.com
The most underrated Objective-C Class
http://www.stephenbalaban.com/caching-with-nscache-the-most-underrated-objective-c-class/
2 comments
I recently changed an image cache in one of my projects to use NSCache instead of NSMutableDictionary. I found that when my application was sent to the background (even for a few seconds), the cache was cleared and the images had to be reloaded on resume. This was not suitable for my application since the initial image request was costly, so I went back to the initial NSMutableDictionary implementation.
I'm curious if anybody has insight into NSCache's caching algorithm? It would be nice to know the details.