fix: warn on custom cache, add option for possibleTypes#2145
Open
robertkowalski wants to merge 1 commit intorelease-bot/next-v15.xfrom
Open
fix: warn on custom cache, add option for possibleTypes#2145robertkowalski wants to merge 1 commit intorelease-bot/next-v15.xfrom
robertkowalski wants to merge 1 commit intorelease-bot/next-v15.xfrom
Conversation
robertkowalski
commented
May 12, 2022
| cache ?? | ||
| new InMemoryCache({ | ||
| possibleTypes: this.options.possibleTypes || possibleTypes, | ||
| }) |
Contributor
Author
There was a problem hiding this comment.
maybe we want
new InMemoryCache(
this.options.cacheOptions || { possibleTypes },
)here which gives the user more flexibility about cache options and might be more future proof
6b32811 to
2745956
Compare
when using a custom cache in the render, memory would grow very fast. to reproduce, clone GHE/marc-molins/hops-15/ run: ``` yarn rm -rf node_modules/.cache/ && yarn build -p clinic doctor -- node ./node_modules/.bin/hops serve ``` and in a seperate window a few times: ``` autocannon -c 50 http://localhost:8080/jobs/test ``` --- current users are now warned when they pass in a custom cache instance and we are offering an option to pass in `possibleTypes` via options. in hops 16, we can remove custom caches. Co-authored-by: Jonas Holland <jonas.holland@new-work.se>
2745956 to
e7b5c38
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
when using a custom cache in the render, memory would grow very
fast.
run:
and in a seperate window a few times:
current users are now warned when they pass in a custom cache
instance and we are offering an option to pass in
possibleTypesvia options.
in hops 16, we can remove custom caches.
Co-authored-by: Jonas Holland jonas.holland@new-work.se
This pull request closes issue # (put the issue number here)
Current state
Changes introduced here
Checklist
Bors merge bot cheat sheet
We are using bors-ng to automate merging of our pull requests. The following table provides a summary of commands that are available to reviewers (members of this repository with push access) and delegates (in case of
bors delegate+orbors delegate=[list]).This is a short collection of opinionated commands. For a full list of the commands read the bors reference.