Spell check For AppLevel key
This commit is contained in:
parent
b0631d1434
commit
40106d3a9c
@ -139,7 +139,7 @@ extension PersistentCacheManager {
|
||||
@objc func shouldSaveAtAppLevel(infoDictionary:[String: AnyHashable]) -> Bool {
|
||||
|
||||
guard let cachePolicy = infoDictionary[KeyCachePolicy] as? Dictionary<String, Any>,
|
||||
let appLevelKey = cachePolicy[KeyAppVelelCachePolicy] as? Bool,
|
||||
let appLevelKey = cachePolicy[KeyAppLevelCachePolicy] as? Bool,
|
||||
appLevelKey == true,
|
||||
self.shouldCachePageJSON(infoDictionary, pageType: PageTypeOfflineFeedback) == true,
|
||||
self.isJSONExpired(infoDictionary) == false else {return false}
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
|
||||
extern NSString * _Nonnull const KeyCachePolicy;
|
||||
extern NSString * _Nonnull const KeyCacheExpiry;
|
||||
extern NSString * _Nonnull const KeyAppVelelCachePolicy;
|
||||
extern NSString * _Nonnull const KeyAppLevelCachePolicy;
|
||||
extern NSString * _Nonnull const PageTypeOfflineFeedback;
|
||||
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
|
||||
NSString * _Nonnull const KeyCachePolicy = @"cachePolicy";
|
||||
NSString * _Nonnull const KeyCacheExpiry = @"expiry";
|
||||
NSString * _Nonnull const KeyAppVelelCachePolicy = @"applicationLevelCache";
|
||||
NSString * _Nonnull const KeyAppLevelCachePolicy = @"applicationLevelCache";
|
||||
NSString * _Nonnull const PageTypeOfflineFeedback = @"offlineFeedback";
|
||||
|
||||
|
||||
@ -324,6 +324,10 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
||||
|
||||
// Adds json to cache with page type key.
|
||||
[weakSelf.pageTypeCache setObject:jsonDictionary forKey:pageType];
|
||||
NSLog(@"Page Type is offline: %@", pageType);
|
||||
if ([pageType isEqualToString:@"offlineFeedback"]) {
|
||||
NSLog(@"Offline");
|
||||
}
|
||||
|
||||
if (![self shouldPersistentlyCachePage:jsonDictionary pageType:pageType]) {
|
||||
[[PersistentCacheManager shared] removeForKey:pageType error:nil];
|
||||
|
||||
Loading…
Reference in New Issue
Block a user