Welcome! Log In Create A New Profile

Advanced

Proxy cache doesn't work in regex location?

Jeff Mitchell
January 27, 2011 11:16PM
Hello,

I have the following two blocks:

location ~* \.atom$ {
proxy_pass http://thin_projects_cluster;
proxy_cache projects;
proxy_cache_valid 200 10m;
proxy_cache_use_stale off;
#return 404;
}

location / {
proxy_pass http://thin_projects_cluster;
#proxy_cache projects;
#proxy_cache_valid 200 10m;
#proxy_cache_use_stale off;
}

If I comment out everything in the top block and uncomment the "return
404" then I get 404 errors when accessing URLs ending in .atom, so I
know that that regex is successfully matching some of my content.

That said, the problem I have is that the cache is not working for the
top block, but if I comment the cache statements in the top block and
uncomment the cache statements in the bottom block, the cache starts
populating as expected. I can't figure out what the difference is.

Does anyone know what might be going on?

Thanks,
Jeff

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

Proxy cache doesn't work in regex location?

Jeff Mitchell January 27, 2011 11:16PM

Re: Proxy cache doesn't work in regex location?

Jeff Mitchell January 28, 2011 12:00AM

Re: Proxy cache doesn't work in regex location?

andrewsuk April 08, 2011 10:32AM

Re: Proxy cache doesn't work in regex location?

Maxim Dounin April 08, 2011 12:00PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready