CacheMMKV
open class CacheMMKV : CacheEngine, @unchecked SendableMMKV缓存。复杂对象需遵循NSCoding|AnyArchivable协议
- 
                  
                  单例模式 DeclarationSwift public static let shared: CacheMMKV
- 
                  
                  主线程初始化MMKV,仅第一次生效,参数cryptKey仅对默认MMKV生效 DeclarationSwift public static func initializeMMKV( cryptKey: Data? = nil, rootDir: String? = nil, groupDir: String? = nil, logLevel: MMKVLogLevel = .info, handler: MMKVHandler? = nil )
- 
                  
                  获取原始MMKV对象 DeclarationSwift public let mmkv: MMKV?
- 
                  
                  初始化默认MMKV缓存 DeclarationSwift override public init()
- 
                  
                  指定参数初始化MMKV缓存 DeclarationSwift public init( mmapID: String, cryptKey: Data? = nil, rootPath: String? = nil, mode: MMKVMode = .singleProcess )
- 
                  
                  Undocumented DeclarationSwift override open func readCache<T>(forKey key: String) -> T?
- 
                  
                  Undocumented DeclarationSwift override open func writeCache<T>(_ object: T, forKey key: String)
- 
                  
                  DeclarationSwift override open func clearCache(forKey key: String)
- 
                  
                  DeclarationSwift override open func clearAllCaches()
- 
                  
                  DeclarationSwift override open func readCacheKeys() -> [String]
 View on GitHub
View on GitHub