I have the following scenario:
- entity with a transient attribute used for sectioning
- web-based data model periodically refreshed
- NSFetchedResultsController
Everything works fine, but when I do a refresh, that transient attribute seems to be getting out of date.
The attribute is returned by an accesssor in my entity object. I tried setting a breakpoint in the accessor, and notice that it's not actually called when my app starts up and my NSFetchedResultsController. This seems to indicate that Core Data is caching this value somewhere (since my table is still section properly). Is there a way to clear this cache?
Best Answer
Yes. Use
The name is the one you provided during
NSFetchedResultsController
initialization time, when callingsetting the
cacheName
argument.Alternatively, you can avoid Core Data caching the data during
NSFetchedResultsController
initialization time: simply passnil
for thecacheName
argument.