Page MenuHomePhabricator

[keyserver][lib] replace neynar client cache with redis cache
ClosedPublic

Authored by varun on Tue, Oct 8, 1:27 PM.
Tags
None
Referenced Files
F2928606: D13637.id44976.diff
Wed, Oct 9, 5:36 AM
F2927261: D13637.diff
Tue, Oct 8, 9:53 PM
F2927004: D13637.diff
Tue, Oct 8, 7:44 PM
Subscribers

Details

Summary

we're using redis because we have multiple keyserver nodes that will need access to this data in order to minimize the number of neynar client calls

instead of caching led channels by the lead user, we cache all channels we get from the fetchFollowed neynar client method by channel ID. we do this in the background since we don't need to block on this operation.

Depends on D13636

Test Plan

tested this in a few different ways:

  1. commented out the background operation that sets data in the cache. registered a user with j4ck.eth's fid and confirmed that user was made lead of bromero community, which they lead on farcaster
  2. uncommented the background operation. deleted and registered j4ck.eth again and confirmed that the information was fetched from the cache using redis-cli monitor. once again, user was made lead of bromero community

Diff Detail

Repository
rCOMM Comm
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Tue, Oct 8, 1:44 PM
ashoat added inline comments.
keyserver/src/updaters/thread-updaters.js
976

We need to wrap this in ignorePromiseRejections, or else rejections will cause the Node.js process to crash and restart

This revision is now accepted and ready to land.Tue, Oct 8, 6:47 PM