This moves all the former lib/redis-client.js code to the new lib/redis module. Several auxiliary and utility classes have been split out into separate modules. In particular:
The Keys module centralizes the creation of Redis keys, which helps document how we're using them.
The PromiseHelper module eliminates a lot of boilerplate wrapper code for callback(err, data)-style Redis API functions.
The AutocompleteIndexer and TargetIndexer interfaces now use the standard addLink/shouldReindexLink/removeLink, which enables the RedisClient implementation to treat them more uniformly and eliminate duplicate code.
Coverage increased (+0.04%) to 98.194% when pulling cadf31b6af63084d202e8871a6358801eb03c4c1 on redis-refactor into c5a1572072a13f4270fea22714eefdfe607b94c3 on master.
This moves all the former
lib/redis-client.js
code to the newlib/redis
module. Several auxiliary and utility classes have been split out into separate modules. In particular:Keys
module centralizes the creation of Redis keys, which helps document how we're using them.PromiseHelper
module eliminates a lot of boilerplate wrapper code forcallback(err, data)
-style Redis API functions.AutocompleteIndexer
andTargetIndexer
interfaces now use the standardaddLink/shouldReindexLink/removeLink
, which enables theRedisClient
implementation to treat them more uniformly and eliminate duplicate code.