CacheKeychain

open class CacheKeychain : CacheEngine, @unchecked Sendable

Keychain缓存。复杂对象需遵循NSCoding|AnyArchivable协议

  • 单例模式

    Declaration

    Swift

    public static let shared: CacheKeychain
  • Undocumented

    Declaration

    Swift

    override public init()
  • 分组对象

    Declaration

    Swift

    public init(group: String?, service: String? = nil)

CacheEngineProtocol

  • Undocumented

    Declaration

    Swift

    override open func readCache<T>(forKey key: String) -> T?
  • Undocumented

    Declaration

    Swift

    override open func writeCache<T>(_ object: T, forKey key: String)
  • Undocumented

    Declaration

    Swift

    override open func clearCache(forKey key: String)
  • Undocumented

    Declaration

    Swift

    override open func clearAllCaches()