Welcome! Log In Create A New Profile

Advanced

proxy_cache - how to change expires ?

Cédric Jeanneret
May 13, 2010 03:56AM
Hello!

I'm using nginx as a proxy-cache for OSM tiles. My problem is this
sentence in documentation :
"""The cache honors backend's Cache-Control, Expires, and etc since
version 0.7.48"""[1]

I saw that we're supposed to be able to override some headers, like
"expires" with proxy_ignore_headers[2], but it doesn't seem to work.

OSM has an expires set to 3 hours. I'd like to keep tiles for 5 days, so I have:
proxy_ignore_client_abort on;
proxy_ignore_headers "Expires" "X-Accel-Expires";
proxy_cache_valid 200 302 7d;
proxy_cache_valid 404 1m;

But it seems my cache is really reseted each 3 hours (for now there
isn't many traffic on this vhost, it's just a proof of concept for a
client).

Did I miss something in the documentation ? if so, what ?
Maybe I don't use the right configuration, too. Any hints ?

Thank you !

Best regards,

C.


[1] http://wiki.nginx.org/NginxHttpProxyModule#proxy_cache
[2] http://wiki.nginx.org/NginxHttpProxyModule#proxy_ignore_headers

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

proxy_cache - how to change expires ?

Cédric Jeanneret May 13, 2010 03:56AM

Re: proxy_cache - how to change expires ?

Maxim Dounin May 13, 2010 06:24AM

Re: proxy_cache - how to change expires ?

Igor Sysoev May 13, 2010 06:30AM

Re: proxy_cache - how to change expires ?

Cédric Jeanneret May 13, 2010 01:18PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 269
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