From df4be14a734d68754129357dbc2a9e4837161bcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Colombaro?= Date: Sun, 2 Dec 2018 17:23:44 +0100 Subject: [PATCH] Improve cache-file-descriptors.conf doc Closes #203 --- .../cache-file-descriptors.conf | 30 ++++++++++++------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/h5bp/web_performance/cache-file-descriptors.conf b/h5bp/web_performance/cache-file-descriptors.conf index e1b2ad0..6549fad 100644 --- a/h5bp/web_performance/cache-file-descriptors.conf +++ b/h5bp/web_performance/cache-file-descriptors.conf @@ -2,21 +2,29 @@ # | Cache file-descriptors | # ---------------------------------------------------------------------- -# This tells Nginx to cache open file handles, "not found" errors, metadata about files and their permissions, etc. +# This tells nginx to cache open file handles, "not found" errors and +# metadata about files and their permissions. # -# The upside of this is that Nginx can immediately begin sending data when a popular file is requested, -# and will also know to immediately send a 404 if a file is missing on disk, and so on. +# Based on these cached metadata, nginx can immediately begin sending +# data when a popular file is requested, and will also know to +# immediately send a 404 if a file is missing on disk, and so on. # -# However, it also means that the server won't react immediately to changes on disk, which may be undesirable. +# (!) It also means that the server won't react immediately to changes +# on disk, which may be undesirable. +# As only metadata are cached, edited files may be troncated until +# the cache is refreshed. +# https://github.com/h5bp/server-configs-nginx/issues/203 # -# In the below configuration, inactive files are released from the cache after 20 seconds, whereas -# active (recently requested) files are re-validated every 30 seconds. +# In the below configuration, inactive files are released from the cache +# after 20 seconds, whereas active (recently requested) files are +# re-validated every 30 seconds. +# Descriptors will not be cached unless they are used at least 2 times +# within 20 seconds (the inactive time). +# A maximum of the 1000 most recently used file descriptors can be +# cached at any time. # -# Descriptors will not be cached unless they are used at least 2 times within 20 seconds (the inactive time). -# -# A maximum of the 1000 most recently used file descriptors can be cached at any time. -# -# Production servers with stable file collections will definitely want to enable the cache. +# Production servers with stable file collections will definitely want +# to enable the cache. # # https://nginx.org/en/docs/http/ngx_http_core_module.html#open_file_cache