CachingManager.swift
753 Bytes
//
// FirstTimeOpen.swift
// browser
//
// Created by Artem Talko on 27.09.2023.
//
import Foundation
final class CachingManager {
private enum Keys {
static let isFirstAppLoad = "IsFirstAppLoad"
static let isAdBlocking = "IsAdBlocking"
}
private init() {}
static let shared = CachingManager()
private let userDefaults = UserDefaults.standard
var isFirstAppLoad: Bool {
get { return userDefaults.bool(forKey: Keys.isFirstAppLoad) }
set { userDefaults.set(newValue, forKey: Keys.isFirstAppLoad) }
}
var isAdBlocking: Bool {
get { return userDefaults.bool(forKey: Keys.isAdBlocking) }
set { userDefaults.set(newValue, forKey: Keys.isAdBlocking) }
}
}