A cache implementation that uses UserDefaults
as the backing storage.
public class UserDefaultsCache
Creates a new UserDefaultsCache
instance.
public convenience init()
Creates a new UserDefaultsCache
instance.
public init(storage: UserDefaults)
- storage: The
UserDefaults
storage to use as the backend.
public func setValue(_ value: String, forKey: String)
public func getValue(forKey: String) -> String?