1
0
mirror of https://github.com/yattee/yattee.git synced 2024-12-13 13:50:32 +05:30
yattee/Model/Cache/CacheModel.swift

17 lines
479 B
Swift
Raw Normal View History

2022-11-10 22:41:28 +05:30
import Foundation
2022-12-10 05:53:13 +05:30
import Logging
2022-11-10 22:41:28 +05:30
struct CacheModel {
static var shared = CacheModel()
2022-12-10 05:53:13 +05:30
let logger = Logger(label: "stream.yattee.cache")
static let bookmarksGroup = "group.stream.yattee.app.bookmarks"
let bookmarksDefaults = UserDefaults(suiteName: Self.bookmarksGroup)
2022-11-11 02:16:37 +05:30
func removeAll() {
guard let bookmarksDefaults else { return }
bookmarksDefaults.dictionaryRepresentation().keys.forEach(bookmarksDefaults.removeObject(forKey:))
2022-11-11 02:16:37 +05:30
}
2022-11-10 22:41:28 +05:30
}