Subscribed channels cache

This commit is contained in:
Arkadiusz Fal
2022-12-10 21:08:03 +01:00
parent 971beddc8d
commit e9c219a76e
9 changed files with 97 additions and 23 deletions

View File

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