rsnext/test/integration/root-optional-revalidate
Gerald Monaco cb8da5778e
Replace withCoalescedInvoke with ResponseCache (#26997)
By itself, `withCoalescedInvoke` with a separate `this.incrementalCache.set(...)` isn't really suitable for streaming responses. Since streaming is asynchronous, updating the cache separately introduces a gap where another origin request for the same resource could be made.

This could potentially be addressed by moving the cache update, but then `IncrementalCache` itself would need to be made to support streaming, in addition to the many other responsibilities it has. In this case, it seemed best to just use composition to add another caching layer in front of it, which is a familiar and understandable concept. Eventually, we might want to move this cache to the HTTP layer, which will also be simpler with this change.

As an added bonus, `renderToResponseWithComponents` becomes significantly simpler, and we delete some duplication.
2021-07-12 19:47:39 +00:00
..
pages Fix optional catch-all /index revalidate params (#16451) 2020-08-21 18:13:24 +00:00
test Replace withCoalescedInvoke with ResponseCache (#26997) 2021-07-12 19:47:39 +00:00
server.js Fix optional catch-all /index revalidate params (#16451) 2020-08-21 18:13:24 +00:00