Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
reidab opened this issue Jun 7, 2018 · 1 comment

Comments

@reidab
Copy link

reidab commented Jun 7, 2018

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.

@mhluska
Copy link

mhluska commented Oct 10, 2018

@reidab I think that's the exact issue I was having here: #89. I hacked around it by modifying fasboot-app-server to use res.write and res.end instead of res.send.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants