Nginx 缓存的配置一例 3shi 2011-07-05 码农 Nginx 123456789101112131415proxy_cache_path /home/web/cache levels=1:2 keys_zone=mydomain:100m inactive=50m max_size=20m; server { listen 80; server_name mydomain.com www.mydomain.com; location / { proxy_pass http://localhost:8080; proxy_temp_path /home/web/temp; proxy_cache mydomain; proxy_cache_valid 200 302 1h; proxy_cache_valid 301 1d; proxy_cache_valid any 1m; } }