mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2024-11-22 20:51:07 +01:00
Removed general caching
This commit is contained in:
parent
68d53cb197
commit
7328fd1b41
@ -16,7 +16,8 @@ location /
|
|||||||
proxy_read_timeout 300s;
|
proxy_read_timeout 300s;
|
||||||
send_timeout 300s;
|
send_timeout 300s;
|
||||||
|
|
||||||
# general caching
|
# cache media files
|
||||||
|
location ~* \.(gif|ico|jpg|jpeg|png|svg|mp4|mp3|pdf)$ {
|
||||||
proxy_cache cache;
|
proxy_cache cache;
|
||||||
proxy_cache_key $host$uri$is_args$args;
|
proxy_cache_key $host$uri$is_args$args;
|
||||||
proxy_cache_revalidate on;
|
proxy_cache_revalidate on;
|
||||||
@ -24,13 +25,6 @@ location /
|
|||||||
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||||
proxy_cache_lock on;
|
proxy_cache_lock on;
|
||||||
proxy_cache_background_update on;
|
proxy_cache_background_update on;
|
||||||
proxy_cache_valid any 5m;
|
|
||||||
expires 5m;
|
|
||||||
|
|
||||||
# cache media files
|
|
||||||
location ~* \.(gif|ico|jpg|jpeg|png|svg|mp4|mp3|pdf)$ {
|
|
||||||
proxy_cache cache;
|
|
||||||
proxy_cache_key $host$uri$is_args$args;
|
|
||||||
proxy_cache_valid 200 301 302 365d;
|
proxy_cache_valid 200 301 302 365d;
|
||||||
expires 365d;
|
expires 365d;
|
||||||
{% if https_port is defined %}
|
{% if https_port is defined %}
|
||||||
@ -44,6 +38,11 @@ location /
|
|||||||
location ~* \.(html|css|js)$ {
|
location ~* \.(html|css|js)$ {
|
||||||
proxy_cache cache;
|
proxy_cache cache;
|
||||||
proxy_cache_key $host$uri$is_args$args;
|
proxy_cache_key $host$uri$is_args$args;
|
||||||
|
proxy_cache_revalidate on;
|
||||||
|
proxy_cache_min_uses 1;
|
||||||
|
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
|
||||||
|
proxy_cache_lock on;
|
||||||
|
proxy_cache_background_update on;
|
||||||
proxy_cache_valid 200 301 302 30m;
|
proxy_cache_valid 200 301 302 30m;
|
||||||
expires 30m;
|
expires 30m;
|
||||||
{% if https_port is defined %}
|
{% if https_port is defined %}
|
||||||
|
Loading…
Reference in New Issue
Block a user