interledger-rs icon indicating copy to clipboard operation
interledger-rs copied to clipboard

Avoid repeatedly loading account details from Redis

Open emschwartz opened this issue 5 years ago • 3 comments

Even though Redis is a fast store, we should avoid loading and parsing the Account details every time we handle a request. Especially if we need a copy of all of them in-memory for the routing table, we should use an in-memory cache of account details and clone the Account object instead of re-loading the details from Redis every time we need them.

emschwartz avatar May 31 '19 17:05 emschwartz

On that note, we could also split the Account in smaller structs and/or make IldcpAccount part of the Account trait

gakonst avatar Jun 07 '19 23:06 gakonst

Should we implement an in-memory cache for any of the store's loaded accounts? (keyed by accountId) @emschwartz

gakonst avatar Nov 28 '19 21:11 gakonst

I think that sounds like a reasonable idea

emschwartz avatar Dec 02 '19 17:12 emschwartz