Welcome! Log In Create A New Profile

Advanced

question about proxy cache

Michał Jaszczyk
June 09, 2009 04:24AM
Hey,

I'm having some problems with proxy_cache. Upstream responds with
Cache-Control and Expires headers set to 30 days. My Nginx is
configured like this:

proxy_cache_path /var/lib/storage levels=2:2
keys_zone=storage:1024m max_size=102400m;

# unimportant stuff cut out

location /storage {
internal;

rewrite ^/storage(.*)$ $1 break;

proxy_method GET;
proxy_pass_request_headers off;
proxy_pass_request_body off;

proxy_pass http://storage;

proxy_intercept_errors on;

proxy_cache storage;
proxy_cache_valid 200 30d;
proxy_cache_valid any 1h;
}

I chose random path on my upstream (something like
/repository/data/3e960a013c9f00000000000000004a1bcf4b10f075cf0000) and
I see that Nginx accesses this path very frequently - few times a day.
I thought that the above config would make Nginx access this path only
once a month. The cache is far from being full. What am I doing wrong?

Regards,

--
Michał Jaszczyk
Subject Author Posted

question about proxy cache

Michał Jaszczyk June 09, 2009 04:24AM

Re: question about proxy cache

Michał Jaszczyk June 10, 2009 07:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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