-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fee estimate server side cache #4398
Conversation
i think we should do that cache at the sdk code only, instead of adding it to server. Server should be purely a wrapper around the sdk. |
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.
best to keep cache at core-sdk, and keeping server wrapper to main functions
@sanchaymittal Wait, |
From what I can recall from the last discussion, Is that we want to release under package @connext/sdk only with different versioning. So ideally we want to have cache being optional at core-sdk itself and wrapper at Server. And sdk turned into wrapper of api calls of server. |
I think we have a similar understanding, but see structure in #4228. What I was assuming is:
|
The cache implemented here is the middleware described in #4223. This is caching at the API layer, not the service level of core sdk |
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.
Nice! I guess we'd need ops setup for this.
…stimate-server-side-cache
Yes for redis and the right configs to feed server |
Description
Minimal changes to enable optional caching on the
estimateRelayerFee
route. This can be extended to other routes if necessary. Opted not to interceptaxiosGet
requests in the Gelato calls as this requires changes in theutils
package and would make removing the server dependency more complex later. This should suffice for reducing latency since most client calls will not use the optional params inSdkEstimateRelayerFeeParams
and will hit the cache for subsequent requests to the sameoriginDomain
/destinationDomain
.Type of change
High-level change(s) description - from the user's perspective
Related Issue(s)
Fixes #4223
Related pull request(s)