Videos cache model

This commit is contained in:
Arkadiusz Fal
2022-12-10 01:23:13 +01:00
parent 0c960c2461
commit 64146b26c2
12 changed files with 204 additions and 9 deletions

View File

@@ -0,0 +1,16 @@
import Foundation
import Logging
struct CacheModel {
static var shared = CacheModel()
let logger = Logger(label: "stream.yattee.cache")
static let bookmarksGroup = "group.stream.yattee.app.bookmarks"
let bookmarksDefaults = UserDefaults(suiteName: Self.bookmarksGroup)
func removeAll() {
guard let bookmarksDefaults else { return }
bookmarksDefaults.dictionaryRepresentation().keys.forEach(bookmarksDefaults.removeObject(forKey:))
}
}