Caching protocol

Consists of methods to cache parsed OData entries.

Syntax

@protocol Caching

Derived classes

Members

All members of Caching, including inherited members.

Methods
Method Description
- (NSString *) addEntry: (ODataEntry *) entry withError: (NSError **) error  
- (void) addNotificationDelegate: (id) delegate withListener: (SEL) listener forUrlKey: (NSString *) urlKey  
- (BOOL) clearCacheForUrlKey: (NSString *) urlKey withError: (NSError **) error  
- (BOOL) clearLocalEntryForEntryId: (NSString *) entryId withError: (NSError **) error  
- (BOOL) deleteEntryForEntryId: (NSString *) entryId withError: (NSError **) error  
- (NSString *) getDeltaLinkForUrlKey: (NSString *) urlKey withError: (NSError **) error  
- (BOOL) initializeCacheWithError: (NSError **) error  
- (BOOL) mergeEntries: (ODataFeed *) feed forUrlKey: (NSString *) urlKey withError: (NSError **) error withCompletionBlock: (NSNotification *) block Deprecated. Use 'mergeEntriesFromFeed' instead. This will be removed in the next drop
- (BOOL) mergeEntriesFromFeed: (ODataFeed *) feed forUrlKey: (NSString *) urlKey withError: (NSError **) error withCompletionBlock: (NSNotification *notification) block  
- (id) readDocumentForUrlKey: (NSString *) urlKey forDocType: (DocType) type withError: (NSError **) error  
- (NSArray *) readEntriesForUrlKey: (NSString *) urlKey withError: (NSError **) error  
- (NSArray *) readEntriesLocalForEntryId: (NSString *) entryId forEntityType: (NSString *) entityType withError: (NSError **) error  
- (BOOL) storeDocument: (id) document forDocType: (DocType) type forUrlKey: (NSString *) urlKey withError: (NSError **) error  
- (BOOL) updateEntry: (ODataEntry *) entry withError: (NSError **) error  

Usage

Cache works against the new parser API (OData*) only. Supports handling delta links and tombstones.

Error codes for caching

600 – Empty/Nil input parameter(s). 601 – No entries match the input. 602 – The entry being marked for delete is not a part of the server cache. Cannot perform operation.