Added file as Swift function.

This commit is contained in:
mayur nilwant 2024-06-11 17:20:23 -04:00
parent 0dc3ccb76a
commit a484f5a193
3 changed files with 14 additions and 4 deletions

View File

@ -119,3 +119,17 @@ public class CachedData: Codable {
}
}
}
extension PersistentCacheManager {
func clearPersistentAppLevelCache() {
do {
try PersistentCacheManager.shared.removeAllAppLevel()
}catch {
MVMCoreLoggingHandler.logDebugMessage(withDelegate:"Failed to delete app level data")
}
}
}

View File

@ -199,5 +199,4 @@ 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;
-(void) clearPersistentAppLevelCache;
@end

View File

@ -430,9 +430,6 @@ static NSString * const STATIC_CACHE_COMPONENT = @"StaticCache.txt";
[[PersistentCacheManager shared] removeAllAndReturnError:nil];
}
-(void) clearPersistentAppLevelCache{
[[PersistentCacheManager shared] removeAllAppLevelAndReturnError:nil];
}
- (void)clearMFCache {
[self.pageTypeQueue cancelAllOperations];