-
Notifications
You must be signed in to change notification settings - Fork 2k
Dashboard: Add the ability to not persist query data to cache. #103791
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
Dashboard: Add the ability to not persist query data to cache. #103791
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: App Entrypoints (~6 bytes removed 📉 [gzipped])
Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used. Sections (~28 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
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.
Changes make sense to me 👍
Relates to: #103723
Proposed Changes
There are times when we don't want to add queries to the cache.
Here are some examples of when we don't want to store to cache:
We currently have this functionality in the state query client, and exclude for
TWO_STEP_QUERY_KEY
. Let's standardize it.Testing Instructions
Add
{ meta: { persist: false } }
to any query. Inspect the localStorage cache (REACT_QUERY_OFFLINE_CACHE
), expect to not see your query.Pre-merge Checklist