mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-03 23:14:55 +08:00
Add Boolean property to turn on and off orphaned object cleanup
This commit is contained in:
@@ -146,6 +146,11 @@
|
||||
|
||||
- (BOOL)deleteLocalObjectsMissingFromMappingResult:(RKMappingResult *)result error:(NSError **)error
|
||||
{
|
||||
if (! self.deletesOrphanedObjects) {
|
||||
RKLogDebug(@"Skipping deletion of orphaned objects: deletesOrphanedObjects=NO");
|
||||
return YES;
|
||||
}
|
||||
|
||||
if (! [[self.requestOperation.request.HTTPMethod uppercaseString] isEqualToString:@"GET"]) {
|
||||
RKLogDebug(@"Skipping cleanup of objects via managed object cache: only used for GET requests.");
|
||||
return YES;
|
||||
|
||||
Reference in New Issue
Block a user