Priority of cache-control, expires, x-accel-expires

brianmercer nginx-forum at nginx.us
Sat Dec 3 00:05:42 UTC 2011


How does nginx caching handle multiple cache control headers sent from a
backend?

I had a situation where I was sending both expires and cache-control and
it seemed that the order in which they were sent controlled.  I solved
that problem by ignoring the expires header.  

I thought I recalled that x-accel-expires would override any other
headers regardless of order, but that doesn't seem to be the case.

Is there a priority, or does order control?

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,219520,219520#msg-219520



More information about the nginx mailing list