Skip to content
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

flareact should check if props already cached when html(pages) requested #108

Open
traffisco opened this issue Jan 26, 2021 · 0 comments
Open

Comments

@traffisco
Copy link
Contributor

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:

  1. check if props already cached and use them to render html responses
  2. cache props(if not cached already) when pages are requested to be used in Link navigation

What`s your thoughts about this?

I can make a PR for this.

Link to a minimal reproduction:

https://github.com/traffisco/flareact-props-caching

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant