Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Enable caching to reduce RPC calls#276

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
ErikBjare merged 4 commits intouniswap-python:masterfromPawlowskiAdrian:patch-1
Oct 12, 2022

Conversation

PawlowskiAdrian
Copy link
Contributor

enable caching, will reduce RPC calls for method chainID

enable caching, will reduce RPC calls for method chainID
@ErikBjare
Copy link
Member

ErikBjare commentedSep 28, 2022
edited
Loading

Thesimple_cache_middleware is probably too aggressive (no cache expiry) and will affect freshness of queried prices etc.

Perhaps look into some of the more sophisticated caching methods? Or we might just want to inform users how to do this themselves in the docs by constructing a custom web3 with a caching layer of choice.

Edit: It seems you can provide arpc_whitelist which could safely have thechainID RPC call in it, that would be an ideal solution!

@PawlowskiAdrian
Copy link
ContributorAuthor

good call@ErikBjare , adding changes

- custom eth caching middleware creation- custom SIMPLE_CACHE_RPC_WHITELIST- flag to enable/disable caching for class Uniswap
@PawlowskiAdrian
Copy link
ContributorAuthor

added changes, looking for any commentary

Copy link
Member

@ErikBjareErikBjare left a comment

Choose a reason for hiding this comment

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

Looks good! Going to let CI run now and will merge if it works :)

@codecov
Copy link

codecovbot commentedOct 12, 2022
edited
Loading

Codecov Report

Base:84.56% // Head:84.13% // Decreases project coverage by-0.42%⚠️

Coverage data is based on head(bd1f168) compared to base(ff26afb).
Patch coverage: 83.33% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@##           master     #276      +/-   ##==========================================- Coverage   84.56%   84.13%   -0.43%==========================================  Files          10       10                Lines        1030     1040      +10     ==========================================+ Hits          871      875       +4- Misses        159      165       +6
Impacted FilesCoverage Δ
uniswap/uniswap.py82.38% <50.00%> (-0.21%)⬇️
uniswap/util.py86.48% <85.71%> (-0.48%)⬇️
uniswap/constants.py100.00% <100.00%> (ø)
uniswap/tokens.py64.28% <0.00%> (-21.43%)⬇️

Help us with your feedback. Take ten seconds to tell ushow you rate us. Have a feature suggestion?Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment?Let us know in this issue.

@ErikBjareErikBjare merged commit0b42700 intouniswap-python:masterOct 12, 2022
@ErikBjare
Copy link
Member

Thanks for this@PawlowskiAdrian :)

PawlowskiAdrian reacted with rocket emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ErikBjareErikBjareErikBjare left review comments

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@PawlowskiAdrian@ErikBjare

[8]ページ先頭

©2009-2025 Movatter.jp