SwiftclassIntelligencePlatform
class IntelligencePlatform.LRUCache
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolIntelligencePlatform.Cache
Members 12
- deinit
deinit - field
let capacity: Int+0x10 - field
var nodeMap: [A : IntelligencePlatform.LRUCacheNode<A, B>]+0x18 - field
let sentinel: IntelligencePlatform.LRUCacheNode<A, B>+0x20 - func
clear() -> () - func
createOrGet(_: A, initializer: () throws -> B) throws -> B - func
get(A) -> B? - func
remove(key: A) -> () - func
set(_: B, forKey: A) -> () - init
IntelligencePlatform.LRUCache.__allocating_init(capacity: Int) -> IntelligencePlatform.LRUCache<A, B> - typealias
typealias Key = A - typealias
typealias Value = B
Header
class LRUCache<A, B> where A: Swift.Hashable { let capacity: Swift.Int var nodeMap: [A : IntelligencePlatform.LRUCacheNode<A, B>] let sentinel: IntelligencePlatform.LRUCacheNode<A, B> init(capacity: Swift.Int) final func createOrGet(_: A, initializer: () throws -> B) throws -> B final func get(_: A) -> B? final func set(_: B, forKey: A) final func clear() final func remove(key: A) deinit }