Skip to content

Commit

Permalink
Temporary workaround for duplicated objects caused by RKInMemoryMappi…
Browse files Browse the repository at this point in the history
…ngCache. refs #612

There are some issues with the current implementation of the RKInMemoryMappingCache that
are allowing the creation of duplicated objects. This commit switches the default cacheStrategy
to RKFetchRequestMappingCache. The primary key branch (#613) contains architecture
improvements that allow for a robust fix to the issues in the memory based cache.
  • Loading branch information
blakewatters committed Mar 31, 2012
1 parent 54d9ee7 commit 947694d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Code/CoreData/RKManagedObjectStore.m
Expand Up @@ -27,6 +27,7 @@
#import "RKAlert.h"
#import "RKDirectory.h"
#import "RKInMemoryMappingCache.h"
#import "RKFetchRequestMappingCache.h"
#import "NSBundle+RKAdditions.h"
#import "NSManagedObjectContext+RKAdditions.h"

Expand Down Expand Up @@ -117,7 +118,7 @@ - (id)initWithStoreFilename:(NSString *)storeFilename inDirectory:(NSString *)ni
self.primaryManagedObjectContext = [self newManagedObjectContext];


_cacheStrategy = [[RKInMemoryMappingCache alloc] init];
_cacheStrategy = [[RKFetchRequestMappingCache alloc] init];

// Ensure there is a search word observer
[RKSearchWordObserver sharedObserver];
Expand Down

0 comments on commit 947694d

Please sign in to comment.