RKFetchRequestManagedObjectCache Class Reference
Inherits from | NSObject |
Conforms to | RKManagedObjectCacheing |
Declared in | RKFetchRequestManagedObjectCache.h RKFetchRequestManagedObjectCache.m |
Overview
Provides a simple managed object cache strategy in which every request for an object is satisfied by dispatching an NSFetchRequest against the Core Data persistent store. Performance can be disappointing for data sets with a large amount of redundant data being mapped and connected together, but the memory footprint stays flat.
Tasks
-
– findInstanceOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext:
Retrieves a model object from the object store given a Core Data entity and the primary key attribute and value for the desired object.
Instance Methods
findInstanceOfEntity:withPrimaryKeyAttribute:value:inManagedObjectContext:
Retrieves a model object from the object store given a Core Data entity and the primary key attribute and value for the desired object.
- (NSManagedObject *)findInstanceOfEntity:(NSEntityDescription *)entity withPrimaryKeyAttribute:(NSString *)primaryKeyAttribute value:(id)primaryKeyValue inManagedObjectContext:(NSManagedObjectContext *)managedObjectContext
Parameters
- entity
The Core Data entity for the type of object to be retrieved from the cache.
- primaryKeyAttribute
The name of the attribute that acts as the primary key for the entity.
- primaryKeyValue
The value for the primary key attribute of the object to be retrieved from the cache.
- mmanagedObjectContext
The managed object context to be searched for a matching instance.
Return Value
A managed object that is an instance of the given entity with a primary key and value matching the specified parameters, or nil if no object was found.
Declared In
RKManagedObjectMappingCache.h