CacheEngine

open class CacheEngine : NSObject, CacheProtocol, CacheEngineProtocol

缓存引擎基类,自动管理缓存有效期,线程安全。复杂对象需遵循NSCoding|AnyArchivable协议

  • Undocumented

    Declaration

    Swift

    override public init()
  • 读取指定key缓存的有效期,大于0有效,小于等于0无效,nil未设置有效期

    Declaration

    Swift

    open func expire(forKey key: String) -> TimeInterval?

CacheProtocol

CacheEngineProtocol