Proxy cache doesn't work in regex location?

Maxim Dounin mdounin at
Fri Apr 8 19:59:40 MSD 2011


On Fri, Apr 08, 2011 at 10:32:10AM -0400, andrewsuk wrote:

> You ever get a solution Jeff?
> I've come accross the same problem when trying to cache anything with a
> .html extension - proxy_cache not liking the location / regex
> :-)

The solution is to carefully check headers returned by backend.

The following may/will disable cache unless ignored with 
proxy_ignore_headers directive: X-Accel-Expires, Expires, 
Cache-Control, Set-Cookie.

Maxim Dounin

More information about the nginx mailing list