diff options
Diffstat (limited to 'node_modules/lru-cache/README.md')
-rw-r--r-- | node_modules/lru-cache/README.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/node_modules/lru-cache/README.md b/node_modules/lru-cache/README.md index ac48e49ac..03ee0f985 100644 --- a/node_modules/lru-cache/README.md +++ b/node_modules/lru-cache/README.md @@ -26,7 +26,8 @@ away. ## Options -* `max` The maximum number of items. Not setting this is kind of +* `max` The maximum size of the cache, checked by applying the length + function to all values in the cache. Not setting this is kind of silly, since that's the whole purpose of this lib, but it defaults to `Infinity`. * `maxAge` Maximum age in ms. Items are not pro-actively pruned out @@ -59,6 +60,15 @@ away. Both of these will update the "recently used"-ness of the key. They do what you think. +* `peek(key)` + + Returns the key value (or `undefined` if not found) without + updating the "recently used"-ness of the key. + + (If you find yourself using this a lot, you *might* be using the + wrong sort of data structure, but there are some use cases where + it's handy.) + * `del(key)` Deletes a key out of the cache. |