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: allow setting code cache directory #31154
Conversation
a7e1b10
to
90ea368
Compare
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.
API looks good to me.
API LGTM |
90ea368
to
a57159b
Compare
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.
Looks like a good idea.
From an API WG pov, my two questions are
-
Does it make sense to expose the size feature to end users? It looks like it would be easy to do, but IDK if there's benefit in it.
-
The previous discussion about what to do with dead cache entries
Co-authored-by: Charles Kerr <charles@charleskerr.com>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
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.
API LGTM
There are three approvals, so this bot being broken is not a reason to block this PR |
Release Notes Persisted
|
I have automatically backported this PR to "17-x-y", please check out #33285 |
I have automatically backported this PR to "18-x-y", please check out #33286 |
* feat: allow setting code cache directory * chore: address review feedback * chore: update docs Co-authored-by: Charles Kerr <charles@charleskerr.com> * chore: rewrite with base::Contains Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
* feat: allow setting code cache directory * chore: address review feedback * chore: update docs Co-authored-by: Charles Kerr <charles@charleskerr.com> * chore: rewrite with base::Contains Co-authored-by: Charles Kerr <charles@charleskerr.com> Co-authored-by: deepak1556 <hop2deep@gmail.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
Description of Change
Add
ses.setCodeCachePath()
API for setting code cache directory.When transitioning to a node-free renderer environment apps which previously relied on creating v8 cached data via the vm module would store the data at version based locations of the format like
<user-data-dir>/<commit-sha-or-version>
so that the cache can be invalidated on updates. When relying on blink to now handle the cache creation and invalidation, this api is useful to serve as a hard reset when the cache goes into a non-recoverable state.Checklist
npm test
passesRelease Notes
Notes: Added
ses.setCodeCachePath()
API for setting code cache directory.