SwiftclassToolKit

class ToolKit.Cache

Members 6

  1. deinitdeinit
  2. fieldlet cache: NSCache<ToolKit.Cache<A, B>.Box<A>, ToolKit.Cache<A, B>.Box<B>>+0x10
  3. funcset(key: A, work: () throws -> B) throws -> B
  4. funcset(key: A, work: () async throws -> B) async throws -> B
  5. initToolKit.Cache.__allocating_init() -> ToolKit.Cache<A, B>
  6. subscriptsubscript.getter : (A) -> B?
class Cache<A, B> where A: Swift.Hashable {
    class Box<A1> {
        let value: A1
    }
    let cache: __C.NSCache<ToolKit.Cache<A, B>.Box<A>, ToolKit.Cache<A, B>.Box<B>>

    init()
    subscript(_: A) -> B? {
        get
        set
    }
    func set(key: A, work: () throws -> B) throws -> B
    func set(key: A, work: () async throws -> B) async throws -> B

    deinit
}