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)")
|
MVMCoreLoggingHandler.logDebugMessage(withDelegate: "CACHEDFEED: EXPIRED, key:\(key), path:\(path)")
|
||||||
throw CacheError.dataExpired
|
throw CacheError.dataExpired
|
||||||
}
|
}
|
||||||
} catch (let error){
|
} catch {
|
||||||
// Remove item from the cache on any failure.
|
// Remove item from the cache on any failure.
|
||||||
try fileManager.removeItem(at: path)
|
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.
|
/// 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;
|
- (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;
|
-(void) clearPersistentAppLevelCache;
|
||||||
@end
|
@end
|
||||||
|
|||||||
@ -141,7 +141,7 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
|
|||||||
- (BOOL)shouldSaveAtAppLevel:(nonnull NSDictionary *)jsonDictionary{
|
- (BOOL)shouldSaveAtAppLevel:(nonnull NSDictionary *)jsonDictionary{
|
||||||
|
|
||||||
NSDictionary *cachePolicy = [jsonDictionary dict:KeyCachePolicy];
|
NSDictionary *cachePolicy = [jsonDictionary dict:KeyCachePolicy];
|
||||||
if (!cachePolicy || ![cachePolicy boolForKey:@"persist"] || ![cachePolicy boolForKey:@"applicationLevelCache"]) {
|
if (![cachePolicy boolForKey:@"applicationLevelCache"] || ![self shouldPersistentlyCacheJSON:jsonDictionary]) {
|
||||||
return NO;
|
return NO;
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user