Simple Swift in-memory LRU cache
Busquets is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Busquets"
- iOS 9.X (iOS 8.X is not tested yet)
- Swift 2.0
To run the example project, clone the repo, and run pod install
from the Example directory first.
let stringCache = Busquets<String>()
stringCache.set("nickname", value: "ushisantoasobu")
print(stringCache.get("nickname"))
let intCache = Busquets<Int>()
intCache.set("age", value: 31)
print(intCache.get("age"))
get(key :String) -> AnyObject?
set(key :String, value :AnyObject) -> Bool
hasValue(key :String) -> Bool
getCapacity() -> Int
getCount() -> Int
getKeys() -> Array<String>
getValues() -> Array<AnyObject>
remove(key :String)
removeAll()
ushisantoasobu, babblemann.shunsee@gmail.com
Busquets is available under the MIT license. See the LICENSE file for more info.