MMRecordOptions Class Reference
Inherits from | NSObject |
Declared in | MMRecord.h |
Overview
This class represents various user settable options that MMRecord will use when starting requests.
Tasks
-
automaticallyPersistsRecords
Starts requests and tethers the managed objects generated from the response to a child context of the one that is passed in rather than saving the objects directly to the persistent store. This method should be used when you want finer-grained control over the context saving behavior of the request. MMRecord will still call save on the underlying child context, as it assumes that the context you pass in is where you want the objects to go. It’s important to note that calling save on a child context only pushes the data up one layer, to the parent, unless the child has no parent, in which case it saves directly to the persistent store.
property -
callbackQueue
The queue that will be used by MMRecord when calling the result and failure blocks.
property -
keyPathForResponseObject
Must return the key path where records are located within the response object. This will only be called if your response object is of type dictionary.
property -
isRecordLevelCachingEnabled
This method indicates whether records returned are cacheable. The record level cache is keyed by the request URL and will obey the HTTP cache control headers.
property -
keyPathForMetaData
This method returns the key path where metadata for the records are located within the response object. This will only be called if your response object is of type dictionary. Returning a non-nil value will short-circuit parsing the cached response body and build a subset of the response using this key and the value from the actual response. This method is provided purely for performance considerations and is not required.
property
Properties
automaticallyPersistsRecords
Starts requests and tethers the managed objects generated from the response to a child context of the one that is passed in rather than saving the objects directly to the persistent store. This method should be used when you want finer-grained control over the context saving behavior of the request. MMRecord will still call save on the underlying child context, as it assumes that the context you pass in is where you want the objects to go. It’s important to note that calling save on a child context only pushes the data up one layer, to the parent, unless the child has no parent, in which case it saves directly to the persistent store.
@property (nonatomic, assign) BOOL automaticallyPersistsRecords
Discussion
Starts requests and tethers the managed objects generated from the response to a child context of the one that is passed in rather than saving the objects directly to the persistent store. This method should be used when you want finer-grained control over the context saving behavior of the request. MMRecord will still call save on the underlying child context, as it assumes that the context you pass in is where you want the objects to go. It’s important to note that calling save on a child context only pushes the data up one layer, to the parent, unless the child has no parent, in which case it saves directly to the persistent store.
Declared In
MMRecord.h
callbackQueue
The queue that will be used by MMRecord when calling the result and failure blocks.
@property (nonatomic) dispatch_queue_t callbackQueue
Discussion
The queue that will be used by MMRecord when calling the result and failure blocks.
Declared In
MMRecord.h
isRecordLevelCachingEnabled
This method indicates whether records returned are cacheable. The record level cache is keyed by the request URL and will obey the HTTP cache control headers.
@property (nonatomic, assign) BOOL isRecordLevelCachingEnabled
Discussion
This method indicates whether records returned are cacheable. The record level cache is keyed by the request URL and will obey the HTTP cache control headers.
Declared In
MMRecord.h
keyPathForMetaData
This method returns the key path where metadata for the records are located within the response object. This will only be called if your response object is of type dictionary. Returning a non-nil value will short-circuit parsing the cached response body and build a subset of the response using this key and the value from the actual response. This method is provided purely for performance considerations and is not required.
@property (nonatomic, copy) NSString *keyPathForMetaData
Discussion
This method returns the key path where metadata for the records are located within the response object. This will only be called if your response object is of type dictionary. Returning a non-nil value will short-circuit parsing the cached response body and build a subset of the response using this key and the value from the actual response. This method is provided purely for performance considerations and is not required.
Declared In
MMRecord.h
keyPathForResponseObject
Must return the key path where records are located within the response object. This will only be called if your response object is of type dictionary.
@property (nonatomic, copy) NSString *keyPathForResponseObject
Discussion
Must return the key path where records are located within the response object. This will only be called if your response object is of type dictionary.
Declared In
MMRecord.h