3

I'm looking into a fairly simple mechanism for caching and and currently using NSCache (for the reason of memory management). Question is - does the cache persist between launches? It seems like no to me.

I get objects put in cache just fine and can take them out of the cache while the app is running no problem. But once I relaunch, seems like the cache is gone.

So is there a way to make the cache persist between launches? If so, how would you re-sync the cache from previous session to the current?

Live2Enjoy7
  • 1,075
  • 2
  • 11
  • 22

1 Answers1

0

NSCache does not persist between launches- if you'd like to save the cache, I'd recommend simply saving the data using CoreData- although if memory management is an issue, then perhaps you'd be saving too much. It truly depends on what you're developing.

username tbd
  • 9,152
  • 1
  • 20
  • 35