I am using NSCache
to deal with cache in my app. Can anybody explain to me how totalCostLimit
and countLimit
works.
I want to allow user input how may memory of using cache he wont to allow for our app and I understand that I need to use totalCostLimit
and countLimit
, but what happen to inputed data if user will close the app, will it be stored or cached somewhere by the app or I need to sore it in database and every time when user will open the app take that data and send it to totalCostLimit
and countLimit
.
Also I do not understand how to observe how much cache is weighting, I want to add that info to app so user whenever he wont will see hove much memory my app takes for cache in that specific moment.
Thank you for the answers!