-
Notifications
You must be signed in to change notification settings - Fork 0
The Initial CacheRedis #1
Conversation
index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this.emit('error', err)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turn this into an EventEmitter for a single event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you also need to re emit errors from redisClient.
One of these finally. I would always point to |
@twolfson This library needs to be API-compatible with this one. The API is "inspired" by ES6 Maps, but deviating in that it's async (with *Local methods if you want speed but don't care about cache correctness). In this case, redis is being used as a shared cache between many workers across servers, so the original temp directory file cache won't do. |
index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
want to remove this print
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
catch exception / callback error?
Other then the print and the |
index.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we emit a ready event after all keys are loaded in the eager case, and right away in the lazy case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
This looks good to me now. |
cc @squamos @Raynos @jcorbin