Fix clear history, add clear cache

This commit is contained in:
Arkadiusz Fal
2022-11-10 21:46:37 +01:00
parent 4d94126abd
commit 4a26ef2839
2 changed files with 24 additions and 19 deletions

View File

@@ -22,4 +22,9 @@ struct CacheModel {
let jsonTransformer = Transformer<JSON>(toData: toData, fromData: fromData)
videoStorage = try? Storage<Video.ID, JSON>(diskConfig: videoStorageConfig, memoryConfig: videoStorageMemoryConfig, transformer: jsonTransformer)
}
func removeAll() {
try? videoStorage?.removeAll()
try? urlBookmarksStorage?.removeAll()
}
}