Limited size cache
import LRUCache
dependencies: [
.package(url: "https://github.com/std-swift/LRUCache.git",
from: "0.1.0")
],
targets: [
.target(
name: "",
dependencies: [
"LRUCache"
]),
]
var cache = LRUCache<Int, Int>(capacity: 1)
cache.set(1, value: 5)
_ = cache.get(1) // 5