question about proxy cache
Michał Jaszczyk
jasiu85 at gmail.com
Tue Jun 9 12:24:34 MSD 2009
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
More information about the nginx
mailing list