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

node: Add cache buster for CoinGecko price queries #3528

Merged
merged 1 commit into from
Nov 21, 2023
Merged

Conversation

djb15
Copy link
Collaborator

@djb15 djb15 commented Nov 14, 2023

Probably overkill but my thinking was that since price queries are every 15 minutes, someone could predict the cache key if just the Unix timestamp was used; hence concatenating the unix timestamp and a random number.

Tested cache hits/misses with Postman

Copy link
Collaborator

@SEJeff SEJeff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@djb15
Copy link
Collaborator Author

djb15 commented Nov 21, 2023

Thanks for the suggestion to test with check_query.go :) Looks like it's happy

@djb15 djb15 merged commit 630c5c3 into main Nov 21, 2023
22 checks passed
@djb15 djb15 deleted the node/coingecko-cache branch November 21, 2023 19:40
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 this pull request may close these issues.

3 participants