mirror of https://github.com/nodejs/node.git
13 lines
259 B
Markdown
13 lines
259 B
Markdown
|
# lru cache
|
||
|
|
||
|
A cache object that deletes the least-recently-used items.
|
||
|
|
||
|
Usage:
|
||
|
|
||
|
var LRU = require("lru-cache")
|
||
|
, cache = LRU(10) // max 10 items. default = Infinity
|
||
|
cache.set("key", "value")
|
||
|
cache.get("key") // "value"
|
||
|
|
||
|
RTFS for more info.
|