title: Options for Caching Generic Object Lists for iPhone?
body: <p>I have an app that connects to an API and retrieves a large number of small objects at a time.  These objects are returned from json-framework as a heirarchy of NSDictionary, NSArray, etc.  They are basic data types, and the primary structure of most of the api calls is a list of items(which could be hundreds of items long).  </p>
  
  <p>I will be displaying the data in a UITableView, but I don't want all the data in memory(as I could potentially eat it all up).  I also don't want to hit up the api for the objects again, as they can be cached for a few hours without any problems.</p>
  
  <p>I have thought of a couple of solutions, but I am eager to hear other options.  I have thought of using Core Data in various ways, but I'd like to avoid having to create and maintain entities for each type of entity returned from the API.  Using Core Data like this seems like overkill.  I could use core data to store archived objects, though I worry about the archiving/de-archiving overhead.</p>
  
  <p>I really want a generic store that can keep a list of objects cached, and then be able to retrieve arbitrary items from the list.</p>
  
  <p>The factors that I care about:</p>
  
  <ul>
  <li><p><strong>Ease of maintenence.</strong>  If the api changes or we add other objects, I don't want to have a lot of places in the code to change.  Storing generic objects(NSCoding compliant) is ideal.</p></li>
  <li><p><strong>Performance.</strong>  Caching and retrieval will all be happening while the user is interacting with the app(in the background), but I don't want to consume too many resources to make the app feel slow.</p></li>
  </ul>
  
  <p>Are there any existing libraries that already exist for this purpose?  What options am I missing?  Maybe convince me that creating Core Data entities for each data type is actually a good idea for an object cache.</p>