diff --git a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift index 17c58d3..b7f1f21 100644 --- a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift +++ b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache+Extension.swift @@ -139,7 +139,7 @@ extension PersistentCacheManager { @objc func shouldSaveAtAppLevel(infoDictionary:[String: AnyHashable]) -> Bool { guard let cachePolicy = infoDictionary[KeyCachePolicy] as? Dictionary, - 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} diff --git a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.h b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.h index 46e2458..84dcb5d 100644 --- a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.h +++ b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.h @@ -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; diff --git a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.m b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.m index d7113f6..a24b548 100644 --- a/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.m +++ b/MVMCore/MVMCore/OtherHandlers/MVMCoreCache.m @@ -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];