I am running nginx as a proxy to an application server and using the proxy_cache features. Caching works fine in "normal" cases, but if my application returns an X-Accel-Redirect header then the response is not cached. Is there any way of caching such responses? Obviously I could stick Varnish or something like that in between nginx and my application, but it would be nice to avoid adding another element to the stack.
I asked this question on ServerFault but didn't get a definitive response: http://serverfault.com/questions/343463/
I'd be very grateful for any insights.
Thanks,
Dave