views:

59

answers:

1

Is there a way to cache NSFetchRequest results, but without using an NSFetchedResultsController? I know how to set the cache name for the results controller, but in a number of instances I just pull data from my core data store and want to cache it -- but have no need for a results controller. Any ideas on how to do this? I can't find anything in Apple's documentation.

A: 

You can keep it in memory in an NSArray. If you want to cache between executions of your application you can't. That portion of the NSFetchedResultsController is not published and the internal structure of Core Data is not open.

If a cache is absolutely needed then use a NSFetchedResultsController.

However, considering the speed and performance of Core Data, I would question the absolute need for a cache. I suspect performance can be gained in other areas.

Marcus S. Zarra