mirror of
https://github.com/yattee/yattee.git
synced 2024-11-10 08:18:19 +00:00
18 lines
487 B
Swift
18 lines
487 B
Swift
|
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:))
|
||
|
}
|
||
|
}
|