-
Notifications
You must be signed in to change notification settings - Fork 122
Cache RPC responses #19
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
feat: cache RPC responses
build: add "@actions/cache" and "@actions/github" as deps build: add "prettier" as dev dep build: regenerate "dist" files chore: add Prettier configuration and Prettier ignore file docs: change author to "Foundry" feat: run "save" function on post style: format JavaScript files with Prettier
- Loading branch information
commit c604ee80613d14e4f8516c163d5341923970467c
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| dist | ||
| node_modules |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| bracketSpacing: true | ||
| printWidth: 120 | ||
| proseWrap: "always" | ||
| singleQuote: false | ||
| tabWidth: 2 | ||
| trailingComma: "all" | ||
| useTabs: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does this bullet mean / what is the store key and restore key? More generally I think I'm unclear on why the logic isn't simpler to just "always cache all responses, clear cache if user changes the cache key". Basically just want to sanity check that the cache isn't deleted if I add/remove new fork blocks or networks to tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't be that simple, unfortunately.
As Twitter user ultrasecreth explained here, we want a mechanism whereby if the fork tests change, the cache is updated too.
If you don't specify the git commit in the cache key, then the cache will never update, even if you completely redesign your tests. Quote from the README:
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I see. And is "store key" the same as the "restore keys" in the actions/cache repo?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my goodness, I have completely butchered the terminology in the proposed README. I'm sorry, I must have been off-caffeine on the day when I opened the PR.
I have pushed a commit to fix the wording, you can see the diff here:
607b0c5
Basically, I should have just said "key", because the "restore keys" never change on the same OS platform. It's the "key" (simple key, no restore) that changes all the time because it's dependent upon the commit hash.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh got it, thanks! Deferring to @gakonst and co. for review/merge 🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mds1 for the review thus far.