Swift 的 LRU 缓存 SwiftlyLRU
- 授权协议: MIT
- 开发语言: Swift
- 操作系统: iOS
- 软件首页: https://github.com/justinmfischer/SwiftlyLRU
软件介绍
//// Example//import Foundation//...//Create cache with capacityvar cache = SwiftlyLRU<String, Float>(capacity: 7) //Add Key, Value pairs
cache["AAPL"] = 114.63
cache["GOOG"] = 533.75
cache["YHOO"] = 50.67
cache["TWTR"] = 38.91
cache["BABA"] = 109.89
cache["YELP"] = 55.17
cache["BABA"] = 109.80
cache["TSLA"] = 231.43
cache["AAPL"] = 113.41
cache["GOOG"] = 533.60
cache["AAPL"] = 113.01
//Retrieve
if let item = cache["AAPL"] {
println("Key: AAPL Value: \(item)")
} else {
println("Item not found.")
}/* OUTPUT Key: AAPL Value: 113.01*/
//Describe
println(cache)/* OUTPUT SwiftlyLRU Cache(7) Key: AAPL Value: Optional(113.01) Key: GOOG Value: Optional(533.6) Key: TSLA Value: Optional(231.43) Key: BABA Value: Optional(109.8) Key: YELP Value: Optional(55.17) Key: TWTR Value: Optional(38.91) Key: YHOO Value: Optional(50.67) *///...C++ Concurrency in Action
Anthony Williams / Manning Publications / 2012-2-28 / USD 69.99
HIGHLIGHT C++ Concurrency in Action is the first book to market to show how to take advantage of the new C++ Standard and how to write robust multi-threaded applications in C++. DESCRIPTION With ......一起来看看 《C++ Concurrency in Action》 这本书的介绍吧!
