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

feat: Add caching to HttpForkSource #114

Merged
merged 14 commits into from
Sep 18, 2023

Conversation

nbaztec
Copy link
Contributor

@nbaztec nbaztec commented Sep 14, 2023

What 💻

  • Adds a caching layer to the http fork source.
  • Adds --cache command line parameter to either:
    • none - disable caching
    • memory - in-memory caching
    • disk - persisted on-disk caching
  • Adds --cache-dir & --reset-cache options to disk caching to select the cache location and whether to purge cache on startup, respectively

Why ✋

  • During testing it is quite often intended to run similar requests multiple times. Having a cache reduces the required number of network calls to be made.

Evidence 📷

image

Notes 📝

@nbaztec nbaztec requested a review from a team as a code owner September 14, 2023 09:08
README.md Outdated Show resolved Hide resolved
src/hardhat.rs Outdated Show resolved Hide resolved
src/main.rs Show resolved Hide resolved
src/http_fork_source.rs Show resolved Hide resolved
src/cache.rs Outdated Show resolved Hide resolved
src/cache.rs Show resolved Hide resolved
Copy link
Collaborator

@MexicanAce MexicanAce left a comment

Choose a reason for hiding this comment

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

LGTM

@MexicanAce MexicanAce merged commit f3e1528 into matter-labs:main Sep 18, 2023
8 checks passed
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.

Implement persistent caching for the HttpForkSource
2 participants