Turns off Caching for JSON responses#680
Conversation
Adds headers to json response to avoid caching of the response
|
What's the rationale for having Flight set this as the default? There are legitimate cases where developers may want to have a JSON response cached for all requests, or just for some requests and not others. I think these headers should be opt-in rather than a blanket default. |
|
So there's been some controversy around this area of code. What you've added will explicitly not require it to be cached, but also some other behaviors make it so it wouldn't cache even with this code not added in. I used to have it added in, but then there was something else (and it escapes me what it was) but something else was causing the caching behavior so I had it removed. I'll need to do some thinking and testing with this guy once I get some time. |
Adds headers to json response to avoid caching of the response