proxy_cache_path path[levels=1:2] [use_temp_path=on|off] keys_zone=name:size [inactive=time] [max_size=size]……(http)proxy_cache_path /opt/app/cache levels=1:2 keys_zone=jim_cache:10m max_size=10g(目录最大存储大小) inactive=60m(一小时内没有访问过缓存文件就被清理) use_temp_path=off;proxy_cache zone | off;(默认off)(httpserverlcation)proxy_cache_valid [code …] time;(httpserverlocation)缓存周期配置proxy_cache_valid 200 12h;#表示200的12h过期proxy_cache_valid any 10m;#表示其他请求都是10分钟过期proxy_cache_key 方式表示已什么方式为key来缓存proxy_cache_key $host$url$is_args$args;proxy_no_cache string不用缓存的urlproxy_no_cache string;(http\server\location)proxy_next_upstream filed filed;发生错误和超时就请求下一台服务器proxy_next_upstream error timeoutslice分片请求slice size(http\server\location)默认size=0;