Skip to content

Cache middleware fails to intercept response if chunkedResponse is enabledΒ #85

@reidab

Description

@reidab

When a cache (like https://github.com/tomdale/fastboot-redis-cache) is provided, the Express server builds middleware to read/write cache entries.

To grab responses, it replaces the implementation of res.send with one that stores to the cache here.

When chunked responses are enabled res.write is called instead of res.send, so nothing is ever written to the cache.

Using something like https://github.com/axiomzen/express-interceptor (or implementing similar techniques) would solve this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions