I have a UITableViewCell, which receives a pointer to an object in the database. That object has it’s own objects on a one-to-one relationship. I want to know how I can access various bits of information from these objects without it accessing the database each time. Sort of along the same lines as ‘am I able to load the data in one go so it’s all ready to go, as part of the pointer, rather than something that needs to be loaded from the database’?
Share
You can use
NSCacheto cache the data. Before going to DB, check if the data is in the cache. If it is not, read the DB and put the results in the cache; next time the access is going to be almost instantaneous.You can also use Core Data to access the database: it caches results for you.