iPhone - NSFetchedResultsController 的缓存名称

标签 iphone caching core-data

大家好

我的 CoreData 驱动应用程序有多个来自同一存储的数据 View ,并且全部使用 NSFetchedResultsController。目前,它们的 NSFetchedResultsController 缓存都具有相同的名称“Root”。我的应用程序的用户可以并且可能会在 View 之间不加区别地跳转。如果我为每个 NSFetchedResultsController 的缓存指定一个唯一的名称,用户体验会更好吗?

TIA,佩德罗:)

最佳答案

建议为不同的提取提供不同的缓存名称,这将有助于提高性能。

摘自 Apple 文档 http://developer.apple.com/library/ios/documentation/CoreData/Reference/NSFetchedResultsController_Class/Reference/Reference.html#//apple_ref/doc/uid/TP40008227-CH1-SW24

If you have multiple fetched results controllers with different configurations (different sort descriptors and so on), you must give each a different cache name.

干杯, 罗格

关于iPhone - NSFetchedResultsController 的缓存名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4295474/

相关文章:

ios - 如何修复 "NSInternalInconsistencyException',原因: 'Invalid update: invalid number of rows in section 0."

iphone - 解析 nsmutabledictionary 将用户电话号码存储在数组中

iphone - 如何在应用程序进入前台时刷新 UIWebView?

iphone - Ipad 中的 ZBar SDK 方向问题?

nhibernate - AppFabric 缓存本地缓存对我们不起作用......我们做错了什么?

ios - 核心数据仅保存到一个实体

iphone - 更改 Safari 和 Chrome 中 iOS 7 状态栏的颜色

javascript - 如何从 Ajax() 的 innerHTML 缓存 JS 文件?

java - 两个应用程序实例可以与 Hibernate L1 缓存一起使用而不会出现任何数据库同步问题吗?

ios - 与核心数据不同的选择