ios - Options for Caching Generic Object Lists for iPhone? -


i have app connects api , retrieves large number of small objects @ time. these objects returned json-framework heirarchy of nsdictionary, nsarray, etc. basic data types, , primary structure of of api calls list of items(which hundreds of items long).

i displaying data in uitableview, don't want data in memory(as potentially eat up). don't want hit api objects again, can cached few hours without problems.

i have thought of couple of solutions, eager hear other options. have thought of using core data in various ways, i'd avoid having create , maintain entities each type of entity returned api. using core data seems overkill. use core data store archived objects, though worry archiving/de-archiving overhead.

i want generic store can keep list of objects cached, , able retrieve arbitrary items list.

the factors care about:

  • ease of maintenence. if api changes or add other objects, don't want have lot of places in code change. storing generic objects(nscoding compliant) ideal.

  • performance. caching , retrieval happening while user interacting app(in background), don't want consume many resources make app feel slow.

are there existing libraries exist purpose? options missing? maybe convince me creating core data entities each data type idea object cache.

in case haven't tried out facebook/three20 library, have implemented disc/memory cache , have used 1 of fundamental layers inside network module. used three20 in app never used cache layer directly, i'm not sure performance it. still, it's nice thing keep in mind.

besides, enormego team has implemented stand-alone photo viewer thing. , inside photo viewer there nicely-working disc-memory cache. i'm not sure whether has three20 cache. believe can cache generic objects other images. can try out yourself.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -