SwiftclassToolKit
class ToolKit.Cache
Members 6
- deinit
deinit - field
let cache: NSCache<ToolKit.Cache<A, B>.Box<A>, ToolKit.Cache<A, B>.Box<B>>+0x10 - func
set(key: A, work: () throws -> B) throws -> B - func
set(key: A, work: () async throws -> B) async throws -> B - init
ToolKit.Cache.__allocating_init() -> ToolKit.Cache<A, B> - subscript
subscript.getter : (A) -> B?
Header
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 }