mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Setup a default managedObjectCache instance of RKFetchRequestManagedObjectCache
This commit is contained in:
@@ -218,6 +218,8 @@ extern NSString * const RKSQLitePersistentStoreSeedDatabasePathOption;
|
||||
|
||||
The managed object cache is used to accelerate intensive Core Data operations by
|
||||
caching managed objects by their primary key value.
|
||||
|
||||
**Default**: An instance of `RKFetchRequestManagedObjectCache`.
|
||||
|
||||
@see RKManagedObjectCaching
|
||||
@warning A nil managed object cache will result in a store that is unable to uniquely identify
|
||||
|
||||
@@ -64,6 +64,7 @@ static RKManagedObjectStore *defaultStore = nil;
|
||||
self = [super init];
|
||||
if (self) {
|
||||
self.managedObjectModel = managedObjectModel;
|
||||
self.managedObjectCache = [RKFetchRequestManagedObjectCache new];
|
||||
|
||||
// Hydrate the defaultStore
|
||||
if (! defaultStore) {
|
||||
|
||||
@@ -50,7 +50,6 @@ static inline NSString * RKDescriptionForRequest(NSURLRequest *request)
|
||||
}
|
||||
|
||||
return self;
|
||||
RKHTTPRequestOperation *operation = [[RKHTTPRequestOperation alloc] initWithRequest:request];
|
||||
}
|
||||
|
||||
- (void)setSuccessCallbackQueue:(dispatch_queue_t)successCallbackQueue
|
||||
|
||||
Reference in New Issue
Block a user