Core Data strategy using in memory cache, or no core data at all?

Posted by randombits on Stack Overflow See other posts from Stack Overflow or by randombits
Published on 2010-04-16T16:08:52Z Indexed on 2010/04/16 16:13 UTC
Read the original article Hit count: 190

Filed under:
|

I have a user interface where the user can check off a bunch of items from a tableview, almost like a todo list. The items are populated from a Core Data stack.

I need to be able to take all of the items they're clicking through and put them into a "temporary" shopping cart. Once they're in the shopping cart, users can go through the list and remove the items, or just submit them to a server. The thing is, the selected items are temporary just like an internet based shopping cart. It's nothing something that gets persisted once the application closes. Once the view is no longer in display, I can assume that the shopping cart is safe to discard.

What's the best way to approach this? Since the user is essentially clicking on instances that map back to a Core Data entity .. should I setup a different persistence store such as in memory and add that store to my managed object context?

© Stack Overflow or respective owner

Related posts about iphone

Related posts about core-data