You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prop requests on Link navigation are cached separately from page requests resulting in data inconsistency.
When a user click on a link, props are fetched and cached. When that target URL is hit directly (or page reloaded), props are fetched again and cached in the page response. This potentially makes different copies of the same target URL.
Also, this have heavy implications if expensive API were used to fetch the data.
This is not a feature request, this is a bug. When one sets revalidate time, one expects the data to be consistent across all navigation types and API getting called only once in that time frame.
flareact should:
check if props already cached and use them to render html responses
cache props(if not cached already) when pages are requested to be used in Link navigation
Describe the problem:
Prop requests on
Link
navigation are cached separately from page requests resulting in data inconsistency.When a user click on a link, props are fetched and cached. When that target URL is hit directly (or page reloaded), props are fetched again and cached in the page response. This potentially makes different copies of the same target URL.
Also, this have heavy implications if expensive API were used to fetch the data.
This is not a feature request, this is a bug. When one sets revalidate time, one expects the data to be consistent across all navigation types and API getting called only once in that time frame.
flareact should:
Link
navigationWhat`s your thoughts about this?
I can make a PR for this.
Link to a minimal reproduction:
https://github.com/traffisco/flareact-props-caching
The text was updated successfully, but these errors were encountered: