diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m index 22be088..ce35730 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadRequestOperation.m @@ -854,12 +854,14 @@ + (void)loadPostCallActions:(nonnull MVMCoreLoadObject *)loadObject { - NSDictionary *postCallsDict = [loadObject.pageJSON dictionaryForKey:@"postLoadActions"]; - if (postCallsDict.count > 0) { - NSArray *actionList = [postCallsDict arrayForKey:@"actionList"]; + NSDictionary *postCallsDict = [loadObject.pageJSON dict:@"postLoadActions"]; + if (postCallsDict) { + NSArray *actionList = [postCallsDict array:@"actionList"]; BOOL isConcurrent = [postCallsDict boolForKey:@"concurrent"]; //Needs further enhancements based on the flags. - if (isConcurrent) { + BOOL shouldTriggerFromCache = [postCallsDict boolForKey:@"shouldTriggerFromCache"]; + //Check if page is not from cache + if (!shouldTriggerFromCache && !loadObject.pageDataFromCache) { [actionList enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { [[MVMCoreActionHandler sharedActionHandler] handleActionWithDictionary:obj additionalData:nil delegateObject:nil]; }];