aboutsummaryrefslogtreecommitdiff
path: root/lib/app.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/app.js')
-rw-r--r--lib/app.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/app.js b/lib/app.js
index 2910b85..38f9f50 100644
--- a/lib/app.js
+++ b/lib/app.js
@@ -36,6 +36,10 @@ function App(sbot, config) {
this.unboxContent = memo({cache: lru(100)}, sbot.private.unbox)
this.reverseNameCache = lru(100)
+ this.getFriendInfo = memo({cache: false}, this._getFriendInfo)
+ this.getFollows = memo({cache: false}, this._getFollows)
+ this.getFollowers = memo({cache: false}, this._getFollowers)
+
this.unboxMsg = this.unboxMsg.bind(this)
this.render = new Render(this, this.opts)
@@ -216,7 +220,7 @@ App.prototype.getFollow = function (source, dest, cb) {
)
}
-App.prototype.getFollows = function (id, cb) {
+App.prototype._getFollows = function (id, cb) {
var self = this
pull(
self.sbot.links({source: id, rel: 'contact', values: true}),
@@ -233,7 +237,7 @@ App.prototype.getFollows = function (id, cb) {
)
}
-App.prototype.getFollowers = function (id, cb) {
+App.prototype._getFollowers = function (id, cb) {
var self = this
pull(
self.sbot.links({dest: id, rel: 'contact', values: true}),
@@ -250,7 +254,7 @@ App.prototype.getFollowers = function (id, cb) {
)
}
-App.prototype.getFriendInfo = function (id, cb) {
+App.prototype._getFriendInfo = function (id, cb) {
var self = this
var done = multicb({pluck: 1, spread: true})
self.getFollows(id, done())