Closed mengwanguc closed 7 years ago
No, don't store it in the Documents directory. The operating system will decide when to clear out NSCache, so it may or may not have the images you saved the previous time you ran the app.
CORRECTION: NSCache won't persist images between app launches. NSCache is similar to a mutable dictionary, except that the system will take care of removing objects from the dictionary if memory is low.
Got it! Thanks!
It's told to cache the images using a NSCache. But it seems that every time we run the app, the NSCache will always be empty, and we need to download all the images. Do we need to store the NSCache in Documents Directory, just like what we did for json data?