Changes with nginx 0.7.44 23 Mar 2009
*) Feature: the ngx_http_proxy_module preliminary cache support.
Get the lastest nginx (0.7.50) and use
proxy_cache_path /path/to/cache levels=1:2 keys_zone=one:10m inactive=7d max_size=200m;
proxy_temp_path /path/to/temp; # must be on the same filesystem
# as cache
server {
location / {
proxy_pass ;
proxy_cache one;
proxy_cache_key backend$request_uri;
proxy_cache_valid 200 1h;
proxy_cache_use_stale error timeout invalid_header;
}
阅读(1260) | 评论(0) | 转发(0) |