Configure cache settings for Nginx

Cache expires after 24h.
After cache is expired, browser can compare ETag to the server to check if the file has changed. If the server returns the same token, then the file is the same, and there's no need to re-download it.

(cherry picked from commit b511f2094f6961bd6d353b86cf8d0d065536d04f)
This commit is contained in:
Quan Tran
2023-03-20 17:29:17 +07:00
committed by Dat Vu
parent 068ace1ade
commit 362c51edb2
+2
View File
@@ -22,6 +22,8 @@ http {
#tcp_nopush on;
keepalive_timeout 65;
expires 86400;
etag on;
include /etc/nginx/conf.d/*.conf;