Skip to content

[✨] Expose next output in middleware for ISR (Incremental Static Regeneration) #52

@fprl

Description

@fprl

Is your feature request related to a problem?

Not a problem but a performance improvement using node/deno adapter by using ISR (Incremental Static Regeneration).

Describe the solution you'd like

It would be nice if Qwik could expose the next output in the middleware.

Right now is of type next: () => Promise<void> where it could be next: MiddlewareNext<Response | EndpointOutput>. With this, we could cache the response and take advantage of ISR.

You can see an example with Astro here.

PS: It would be nice to also have a section like this in the docs, explaining how to achieve ISR with different adapters.

Thank you.

Describe alternatives you've considered

Maybe an alternative would be to expose some kind of method in the middleware request event.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions