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

Cache prices provider token info per address #2273

Open
iamacook opened this issue Jan 20, 2025 · 0 comments
Open

Cache prices provider token info per address #2273

iamacook opened this issue Jan 20, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@iamacook
Copy link
Member

Description

We are caching prices provider responses based on query parameters. These parameters may include multipl token addresses, of varying order, e.g. {url}?token=a,b,c vs. {url}?token=b,a,c. As such, we are caching inconsistently.

We should be caching token info per address, checking whether they exist first before requesting those missing. This will, in turn, reduce the number of requests to our prices provider.

Reproduction steps

  1. Request prices of tokens in a certain order.
  2. Adjust order and request again.

Observe cache miss on second request.

Expected behavior

Cache hit should occur for given example.

Additional information

No response

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

No branches or pull requests

1 participant