Commit 5225db1d0cd9f2285ba984868432f417086a7a58
Don't re-fetch cached message
Charles Lehner committed on 8/8/2016, 7:44:36 AMParent: 02f6ec268886a1f83acfd2683d727d8eb33cf9bb
Files changed
sbot-api.js | changed |
sbot-api.js | ||
---|---|---|
@@ -117,9 +117,9 @@ | ||
117 | 117 | return sbot.createUserStream(opts) |
118 | 118 | }), |
119 | 119 | sbot_get: rec.async(function (key, cb) { |
120 | 120 | if(CACHE[key]) cb(null, CACHE[key]) |
121 | - sbot.get(key, function (err, value) { | |
121 | + else sbot.get(key, function (err, value) { | |
122 | 122 | if(err) return cb(err) |
123 | 123 | cb(null, CACHE[key] = value) |
124 | 124 | }) |
125 | 125 | }), |
Built with git-ssb-web