h5bp/server-configs-nginx

cache-file-descriptors.conf not to be used without atomic modifications

Dreamsorcerer opened this issue · 1 comments

The description in cache-file-descriptors.conf is wrong, and can lead to broken sites. It claims that the files are cached, and changes won't appear until the cache expires after 30s.

Actually, only the metadata is cached and changes will appear immediately. The problem is that the size of the file is part of the cached metadata, so editing a file can result in the new version getting truncated until the cache expires, resulting in broken sites for up to 30s.

If atomic modifications are not in use on the server, then open_file_cache should not be recommended at all, atleast until there is some automatic invalidation in place. If atomic modifications are in place, then I see no reason not to use a much longer cache time, such as 1 day.

See my bug report here for further information: https://trac.nginx.org/nginx/ticket/1630

The description has been updated.
That said the cache-file-descriptors.conf file may be refreshed a bit, and we are definitely opened for PR!

Thanks! 👍