Skip to content

Latest commit

 

History

History
47 lines (29 loc) · 703 Bytes

UserDefaultsCache.md

File metadata and controls

47 lines (29 loc) · 703 Bytes

UserDefaultsCache

A cache implementation that uses UserDefaults as the backing storage.

public class UserDefaultsCache

Inheritance

CacheProtocol

Initializers

init()

Creates a new UserDefaultsCache instance.

public convenience init()

init(storage:)

Creates a new UserDefaultsCache instance.

public init(storage: UserDefaults)

Parameters

  • storage: The UserDefaults storage to use as the backend.

Methods

setValue(_:forKey:)

public func setValue(_ value: String, forKey: String)

getValue(forKey:)

public func getValue(forKey: String) -> String?