express-redis-cache
express-redis-cache copied to clipboard
Support caching streamed responses (res.write, res.end)
Accumulate content in a buffer on res.write
. Save the buffer as cache on res.end
Did this make it anywhere?
It hasn't been merged, but this branch is being used in prod in our project.
Before I bug you to much for a peak at some code... do you think it would support Marko templates (if your familiar) they require a writeable stream as their out and don’t call send on res. Not sure what is called to actually finish the send, but I don’t remember end being fired on res either.
Also, did you end up working to remove domain from your version by any chance?
@smulder sorry I don't know what Marko templates are. I didn't remove domain.
I just ported your code over to my copy and it works excellent, puts the easy middleware use back in my situation rather than having to custom code each route.
Thank you for doing that, bummer they never merged it!
Perfect. Glad it worked for you. I was surprised it wasn't there in the first place - looks like a common scenario.