title: Is it necessary to cache data returned from CoreData?
body: <p>I store data in an iPhone app using CoreData.  The data stored is intended to represent a tree, with each record being a node (with pointer to its parent).  As the user navigates through this tree, I cache the current parent and current set of children in an NSArray.  I initially thought this made sense because it could allow quicker access of sibling nodes (useful when the data is presented in a UITableView and the user scrolls).  I felt that using CoreData to perform a "get all children" query each time  the next child is required would be inefficient (i.e. I'd be making the same query n times for n children, and just returning the ith result each time).</p>
  
  <p>Now, I am not so sure this is necessary nor smart (mostly because I've learned that CoreData is a beast I have yet to fully understand).<br>
  Does anybody know whether this is good practice?  I know CoreData does a lot for free including the caching of results, but since I know my data is going to be used like a tree, would my implementation (or some other outside-of-CoreData cache implementation) be more efficient?</p>