|
Mobile API Reference
MicroStrategy 2019
|
#import <MSICacheManager.h>
Instance Methods | |
| (void) | - retrieveCacheForObjectId:withPriority:withElementsPromptAnswers:andProjectInfo:completionHandler: |
| (void) | - retrieveCacheForObjectId:withPriority:withElementsPromptAnswers:andValuePromptAnswers:andProjectInfo:completionHandler: |
| (MSIDocumentCache *) | - cacheForKey: |
| (void) | - deleteAllCaches |
| (void) | - deleteAllCachesBeforeDate: |
| (void) | - deleteCache: |
| (void) | - deleteCachesForObjectId:projectInfo: |
Class Methods | |
| (MSICacheManager *) | + manager |
This class is for SDK users to monitor and manage cache status
| - (MSIDocumentCache*) cacheForKey: | (NSString *) | key |
This method will return the cache of certain key
| key | should be created by [NSString stringWithFormat:"%%%%", projectIdentifier, objectId, elementsPromptAnswers, valuePromptAnswers]; ProjectInfo has an instance method called projectIdentifier, which will return a string as projectIdentifier If the document does not contain prompt answer, we should provide nil as parameter: [NSString stringWithFormat:"%%%%", projectIdentifier objectId, nil, nil]; |
| - (void) deleteAllCaches |
| - (void) deleteAllCachesBeforeDate: | (NSDate *) | date |
| - (void) deleteCache: | (MSIDocumentCache *) | cache |
| - (void) deleteCachesForObjectId: | (NSString *) | objectId | |
| projectInfo: | (MSIProjectInfo *) | projectInfo | |
| + (MSICacheManager*) manager |
| - (void) retrieveCacheForObjectId: | (NSString *) | objectId | |
| withPriority: | (MSMCachePriorities) | priority | |
| withElementsPromptAnswers: | (NSString *) | elementsPromptAnswers | |
| andProjectInfo: | (MSIProjectInfo *) | projectInfo | |
| completionHandler: | (void(^)(MSIDocumentCache *documentCache, NSError *error)) | handlerBlock | |
This method is already deprecated, user should use the next method and set value prompt to nil if there is no value prompt
| - (void) retrieveCacheForObjectId: | (NSString *) | objectId | |
| withPriority: | (MSMCachePriorities) | priority | |
| withElementsPromptAnswers: | (NSString *) | elementsPromptAnswers | |
| andValuePromptAnswers: | (NSString *) | valuePromptAnswers | |
| andProjectInfo: | (MSIProjectInfo *) | projectInfo | |
| completionHandler: | (void(^)(MSIDocumentCache *documentCache, NSError *error)) | handlerBlock | |
This method will retrieve cache at report/document and prompt answer level.
| objectId | is the id of the object you want to retrieve cache for. |
| withPriority | is used to define the priority of current request. projectInfo is used to specify project, if not provided, we will use default projectInfo |
| block | is used when the MSMCache is retrieved. |