Fixed issue for app level check.
This commit is contained in:
parent
7a25d12be4
commit
7f27bb502e
@ -81,7 +81,7 @@ public class CachedData: Codable {
|
||||
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "CACHEDFEED: EXPIRED, key:\(key), path:\(path)")
|
||||
throw CacheError.dataExpired
|
||||
}
|
||||
} catch (let error){
|
||||
} catch {
|
||||
// Remove item from the cache on any failure.
|
||||
try fileManager.removeItem(at: path)
|
||||
|
||||
|
||||
@ -199,7 +199,5 @@ typedef void(^MVMCoreGetImageBlock)(UIImage * _Nullable, NSData * _Nullable, BOO
|
||||
/// Loads an AVPlayerAsset from the shared asset cache.
|
||||
- (void)playerAssetFromFileName:(nonnull NSString *)filename trackKeys:(nonnull NSArray *)trackKeys onComplete:(void(^_Nonnull)(AVAsset * _Nullable, NSString * _Nonnull, MVMCoreErrorObject * _Nullable))completionHandler;
|
||||
|
||||
- (BOOL)shouldSaveAtAppLevel:(nonnull NSDictionary *)jsonDictionary;
|
||||
|
||||
-(void) clearPersistentAppLevelCache;
|
||||
@end
|
||||
|
||||
@ -141,7 +141,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
||||
- (BOOL)shouldSaveAtAppLevel:(nonnull NSDictionary *)jsonDictionary{
|
||||
|
||||
NSDictionary *cachePolicy = [jsonDictionary dict:KeyCachePolicy];
|
||||
if (!cachePolicy || ![cachePolicy boolForKey:@"persist"] || ![cachePolicy boolForKey:@"applicationLevelCache"]) {
|
||||
if (![cachePolicy boolForKey:@"applicationLevelCache"] || ![self shouldPersistentlyCacheJSON:jsonDictionary]) {
|
||||
return NO;
|
||||
}
|
||||
return true;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user