David Barratt

Results 38 comments of David Barratt

> I think that this only happens if you use flareact Link with prefetch on. When landing on a cached route(directly or with hard navigation) you just get rendered html...

Take a look at this function: https://github.com/flareact/flareact/blob/02cd98a99d7e1bebf6599d2520389310fc7bdfef/src/client/page-loader.js#L79-L83 which is called by: https://github.com/flareact/flareact/blob/02cd98a99d7e1bebf6599d2520389310fc7bdfef/src/router.js#L55 I want to prevent that from happening. The only way (looking at the code) is by **not** having...

> Another option is to hard navigate to a dynamic route url, SSR will be dynamic based on that url I've said this three times, but it's really not, it...

> You mean this? > [#80 (comment)](https://github.com/flareact/flareact/discussions/80#discussioncomment-205149) The XHR is going to happen whether it is prefetched or not. Prefetching just makes it happen _before_ you click the Link. At...

> Unless you DON'T use `Link`. Assuming you set the cache parameter, GetEdgeProps will run only once from the worker(you referenced the code yourself) and return cached page version on...

In other words, the props are cached either way, if it's returned in JSON or in HTML, that is irrelevant. What I'm trying to do is not make a request...

> Correct. But all the heavy lifting happens only once. Upon following hits to that route, your client served with rendered html and the usual js bundle To put this...

Looking at https://nextjs.org/docs/basic-features/data-fetching#incremental-static-regeneration that's how Next.js works with `revalidate`. I wonder if this is how it should work here too? Maybe any value `>= 0` would cache it forever, and...

@jplhomer ugh. So... it looks like @cloudflare supports [stale-while-revalidate](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cache-Control#Expiration) https://support.cloudflare.com/hc/en-us/articles/115003206852-Understanding-Origin-Cache-Control#h_4250342181031546894839080 Though I'm not sure how that works with `Cache.match()` Ideally you'd be able to set the `max-age` to whatever `revalidate`...

> This isn't currently exposed via the API How does Wrangler do it?