updated nginx caching templates

This commit is contained in:
Serghey Rodin 2013-09-04 10:40:01 +03:00
commit f6d5e24edc
3 changed files with 3 additions and 2 deletions

View file

@ -83,6 +83,7 @@ http {
# Cache
proxy_cache_path /var/cache/nginx levels=2 keys_zone=cache:10m inactive=60m max_size=512m;
proxy_temp_path /var/cache/nginx/temp;
proxy_cache_key "$host$request_uri $cookie_user";
proxy_ignore_headers Expires Cache-Control;
proxy_cache_use_stale error timeout invalid_header http_502;
proxy_cache_valid any 3d;

View file

@ -10,7 +10,7 @@ server {
proxy_pass http://%ip%:%web_port%;
proxy_cache cache;
proxy_cache_valid 10m;
proxy_cache_valid 15m;
proxy_cache_valid 404 1m;
proxy_no_cache $no_cache;
proxy_cache_bypass $no_cache;

View file

@ -7,7 +7,7 @@ server {
proxy_pass http://%ip%:%web_port%;
proxy_cache cache;
proxy_cache_valid 10m;
proxy_cache_valid 15m;
proxy_cache_valid 404 1m;
proxy_no_cache $no_cache;
proxy_cache_bypass $no_cache;