-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Avoid using DepTrackingCache for optimistic reads. #4251
Merged
Merged
Commits on Dec 19, 2018
-
Avoid DepTrackingCache for optimistic reads.
This should help with #4210, since temporary optimistic ObjectCache objects will no longer be instanceof DepTrackingCache, so the result caching system will be disabled for those reads, and thus the temporary objects will not be retained in any cache keys: https://github.com/apollographql/apollo-client/blob/7d0ed16a97e57cb3789f352fd4f359eaaa2eec0b/packages/apollo-cache-inmemory/src/readFromStore.ts#L123 https://github.com/apollographql/apollo-client/blob/7d0ed16a97e57cb3789f352fd4f359eaaa2eec0b/packages/apollo-cache-inmemory/src/readFromStore.ts#L144
Configuration menu - View commit details
-
Copy full SHA for 56c5dcb - Browse repository at this point
Copy the full SHA 56c5dcbView commit details -
Configuration menu - View commit details
-
Copy full SHA for b1ac9ef - Browse repository at this point
Copy the full SHA b1ac9efView commit details -
Configuration menu - View commit details
-
Copy full SHA for 307c8c9 - Browse repository at this point
Copy the full SHA 307c8c9View commit details -
Allow disabling InMemoryCache result caching.
Although this is a rather drastic option, creating an InMemoryCache that does not attempt to cache previous results may help reduce memory usage, at the expense of cache performance on repeated reads: new InMemoryCache({ resultCaching: false, // defaults to true }) See this comment by @barbalex for one such situation: #4210 (comment) At the very least, this option should help diagnose problems with result caching, even if it's not the right long-term solution.
Configuration menu - View commit details
-
Copy full SHA for cfc8fdf - Browse repository at this point
Copy the full SHA cfc8fdfView commit details -
Remove extremely frustrating auto-
git add
behavior from lint-staged.Anyone who uses `git add -p` or `git commit -p` to contruct their commits from a careful subset of current changes has been bitten by this thoughtless policy many times. I'm done working around it.
2Configuration menu - View commit details
-
Copy full SHA for d5a9dd1 - Browse repository at this point
Copy the full SHA d5a9dd1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9a5370 - Browse repository at this point
Copy the full SHA c9a5370View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b828e1 - Browse repository at this point
Copy the full SHA 9b828e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for f25c0dd - Browse repository at this point
Copy the full SHA f25c0ddView commit details
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.