give server cache control
This commit is contained in:
parent
2259725d7a
commit
d0621c51bb
@ -218,7 +218,10 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adds json to cache with page type key.
|
// Adds json to cache with page type key.
|
||||||
[weakSelf.pageTypeCache setObject:jsonDictionary forKey:pageType];
|
NSNumber *shouldCache = [jsonDictionary objectForKey:@"cache" ofType:[NSNumber class]];
|
||||||
|
if (!shouldCache || shouldCache.boolValue) {
|
||||||
|
[weakSelf.pageTypeCache setObject:jsonDictionary forKey:pageType];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (completionBlock) {
|
if (completionBlock) {
|
||||||
@ -252,7 +255,10 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Adds json to cache with page type key.
|
// Adds json to cache with page type key.
|
||||||
[weakSelf.moduleCache setObject:obj forKey:key];
|
NSNumber *shouldCache = [jsonDictionary objectForKey:@"cache" ofType:[NSNumber class]];
|
||||||
|
if (!shouldCache || shouldCache.boolValue) {
|
||||||
|
[weakSelf.moduleCache setObject:obj forKey:key];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user