nitrojs / nitro

Next Generation Server Toolkit. Create web servers with everything you need and deploy them wherever you prefer.

Home Page:https://nitro.build

Repository from Github https://github.comnitrojs/nitroRepository from Github https://github.comnitrojs/nitro

Cache stream responses

kerwanp opened this issue · comments

Describe the feature

Current behavior

When a stream is used in a cachedEventHandler the cached body is the serialized stream and not the result of this stream.
Resulting in an undesired behavior as the response sent when taken from the cache is the serialized stream.

Desired behavior

When a cachedEventHandler returns a stream, the stream should be return and the response of the stream should be cached as the body.

Additional information

  • Would you be willing to help implement this feature?