SDMCache

The SDMCache is a programming interface that provides in-memory cache for quick data access. Its APIs allow adding, removing and searching items stored in the cache. The cache also acts as a central, shared storage, avoiding the need to pass frequently used data between view controllers.

List of Features

SDMCache Public APIs

- (void) setCapacity:(unsigned short) value
– (unsigned short) capacity
- (void) clear
- (void) setODataServiceDocument:(SDMODataServiceDocument*) serviceDocument_in
- (id) initWithServiceDocument:(SDMODataServicedocument*) serviceDoc_in
+ (id) cacheWithServiceDoc:(SDMODataServicedocument*) serviceDoc_in
- (NSArray*)filterEntriesOfCollection:(NSString*) collectionName_in forSearchText:(NSString*)searchText_in
- (SDMODataServiceDocument*) getODataServiceDocument
- (BOOL) removeODataServiceDocument
- (void) setODataEntry:(SDMODataEntry*) entry_in byCollection:(NSString*) collectionName_in
- (SDMODataEntry*) getODataEntryByCollection:(NSString*) collectionName_in andEntryId:(NSString*) entryId_in
- (void) setODataEntries:(NSArray *) entries_in byCollection:(NSString*) collectionName_in
- (NSArray*) getODataEntriesByCollection:(NSString*) collectionName_in
- (NSArray*) getCollectionsByWorkspace:(SDMDataWorkspace*)workspace_in
- (SDMODataCollection*) getCollectionByName:(NSString*)collectionName_in
- (BOOL) removeODataEntry:(SDMODataEntry*)entry_in forCollection:(NSString*) collectionName_in
- (BOOL) removeODataEntriesForCollection:(NSString*) collectionName_in
- (NSArray*) getAllWorkspaces
- (NSArray*) getWorkspacesBySemantic:(enum TEN_WORKSPACE_SEMANTICS)
- (void) setShouldAutoSaveOnMemoryWarning:(BOOL)flag_in
- (BOOL) shouldAutoSaveOnMemoryWarning
- (void) setRegexSearchEnabled:(BOOL)flag_in
- (BOOL) isRegexSearchEnabled

Technical Details

The common methods are defined by the SDMCaching protocol. (See also: SDMCache default implementation.)