From 1aeb828fc8c4990a6c8a30f1d93938d7161f7770 Mon Sep 17 00:00:00 2001 From: Bryan Donovan Date: Thu, 31 Oct 2013 08:39:53 -0700 Subject: [PATCH] README cleanup --- README.md | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/README.md b/README.md index b754a50..af0e7b7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ priority cache(s) first. First, it includes a `wrap` function that lets you wrap any function in cache. (Note, this was inspired by [node-caching](https://github.com/mape/node-caching).) -This is probably the feature you're looking for. As an example, where you might have to do this +This is probably the feature you're looking for. As an example, where you might have to do this: ```javascript function get_cached_user(id, cb) { @@ -54,16 +54,6 @@ function get_cached_user(id, cb) { get_user(id, cache_callback); }, cb); } - -get_cached_user(user_id, function (err, user) { - // First time fetches the user from the (fake) database: - console.log(user); - - get_cached_user(user_id, function (err, user) { - // Second time fetches from cache. - console.log(user); - }); -}); ``` Second, node-cache-manager features a built-in memory cache (using [node-lru-cache](https://github.com/isaacs/node-lru-cache)),