Skip to content
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

perf: Cache responses from PragmAPI #16

Closed
akhercha opened this issue Aug 20, 2024 · 0 comments · Fixed by #21
Closed

perf: Cache responses from PragmAPI #16

akhercha opened this issue Aug 20, 2024 · 0 comments · Fixed by #21

Comments

@akhercha
Copy link
Member

akhercha commented Aug 20, 2024

Current Behavior

We ask the same prices from the Pragma API over & over.

Expected Behavior

We should implement a small cache (probably 1min life) so that it goes a lot faster for the checks.


NOTE: One idea hanging maybe worth exploring:

Have a parallel service responsible of querying all the Pragma API USD prices every X seconds and fill a hashmap ASSET <=> PRICE accessible by the monitoring service, which will only read it and does not care about querying the API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant