module map caching and page map caching. we are going to store the common webPunchOunt_UAD
This commit is contained in:
parent
3c8af09752
commit
884e0988df
@ -239,8 +239,22 @@
|
||||
|
||||
// Check cache function if page json is already in the cache.
|
||||
[[MVMCoreCache sharedCache] fetchJSONForPageType:requestParameters.pageType completionHandler:^(NSDictionary * _Nullable jsonDictionary) {
|
||||
completionHandler(jsonDictionary,nil);
|
||||
}];
|
||||
if ([requestParameters.pageType isEqualToString:@"webPunchOut_UAD"]) {
|
||||
NSMutableDictionary *newJsonDictionary = [jsonDictionary mutableCopy];
|
||||
NSString *flowName = requestParameters.actionMap[@"extraParameters"][@"flowName"];
|
||||
[[MVMCoreCache sharedCache] fetchJSONForModule: flowName completionHandler:^(NSDictionary * _Nullable moduleJsonDictionary) {
|
||||
if (moduleJsonDictionary[flowName] != NULL && moduleJsonDictionary[flowName][@"browserUrl"] != NULL) {
|
||||
[newJsonDictionary setObject: moduleJsonDictionary[flowName][@"browserUrl"] forKey:@"browserUrl"];
|
||||
completionHandler(newJsonDictionary, nil);
|
||||
}
|
||||
}];
|
||||
//jsonDictionary[@"browserUrl"] =
|
||||
} else {
|
||||
completionHandler(jsonDictionary,nil);
|
||||
}
|
||||
}];
|
||||
|
||||
|
||||
} else if (modules > 0) {
|
||||
|
||||
// Check cache function if modules already in the cache.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user