Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

fix(uniswap-v2): Make cache key generic in helper #649

Merged
merged 1 commit into from
Jun 14, 2022
Merged

Conversation

pwele
Copy link
Contributor

@pwele pwele commented Jun 14, 2022

Description

Some apps are using the UniswapV2TheGraphPoolTokenAddressStrategy helper to perform external query to The Graph. The result is cached for 5 minutes. The problem is the cache has only the Network as dynamic parameter, meaning multiple Apps using that helper might have collisions.
I am changing the cache key building strategy to prevent that. Now the network, appId and groupId will be used as part of the cache key.

Checklist

How to test?

http://localhost:5001/apps/uniswap-v2/tokens?network=ethereum&groupIds%5B%5D=pool&api_key=562eee97-e90e-42ac-8e7b-363cdff5cdaa

@pwele pwele force-pushed the fix-uniswap-helper branch from 9ee02c7 to 4e0a68f Compare June 14, 2022 20:50
@pwele pwele merged commit 17cdfea into main Jun 14, 2022
@pwele pwele deleted the fix-uniswap-helper branch June 14, 2022 20:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants