From a2f246102504fbca9be5d0ef020069574be2d0c5 Mon Sep 17 00:00:00 2001 From: ahmza Date: Sat, 15 Jan 2022 12:53:36 +0000 Subject: [PATCH] changed cache policy for images and css/js/html --- nginx.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nginx.conf b/nginx.conf index 57153e9..0229a51 100644 --- a/nginx.conf +++ b/nginx.conf @@ -49,7 +49,7 @@ http { # Media: images, icons, video, audio, HTC location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|htc)$ { - expires 1M; + expires 1y; access_log off; add_header Cache-Control "public"; } @@ -57,7 +57,7 @@ http { # Javascript and CSS files location ~* \.(?:css|js)$ { try_files $uri =404; - expires 1y; + expires 1m; access_log off; add_header Cache-Control "public"; }