interledger-rs
interledger-rs copied to clipboard
Avoid repeatedly loading account details from Redis
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.
On that note, we could also split the Account
in smaller structs and/or make IldcpAccount
part of the Account
trait
Should we implement an in-memory cache for any of the store's loaded accounts? (keyed by accountId) @emschwartz
I think that sounds like a reasonable idea