Answer the question
In order to leave comments, you need to log in
Why can't I cache?
Here is a config
proxy_cache_path /var/lib/nginx/cache/ levels=1:2 keys_zone=zone_one:10m;
proxy_set_header Accept-Encoding "";
location /talk {
sub_filter_once off;
sub_filter '="aaa' '="bbb';
proxy_cache zone_one;
proxy_ignore_headers Expires;
proxy_ignore_headers Cache-Control;
proxy_cache_valid any 30m;
proxy_cache_key $host$uri$request_uri$is_args$args$geo;
proxy_cache_bypass $cookie_pass_hash;
proxy_no_cache $cookie_pass_hash;
add_header X-Cache-Status $upstream_cache_status;
proxy_pass http://127.0.0.1:8080;
}
Answer the question
In order to leave comments, you need to log in
Your cache gets a response with X-Cache-Status: MISS
Make an access_log with $upstream_cache_status;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question