/nf/tool_icon_css is a dynamically created CSS file. It is currently cached via etag headers, but that means a request still goes to the server and it has to respond with a 304. So this is a lot of extra requests (on sf.net, ~35% of /nf/tool_icon_css requests are 304s)
We should set a future expires header, and then do cache-busting with a unique URL by appending ?{{config.build_key}}
(build_key is already used for this purpose for all our other static resources)
tv/7027
allura/lib/utils.py:serve_file() already adds a default expires header, the value just needs to be set in the ini file.
Is there some missing code related to the new
file_expires_header_secs
config? I'm not seeing anything that uses that to set theExpires
value header further out.Nevermind, just saw your comment and looking at
serve_file()
I see the config is called "files_expires_header_secs"Updated key name. Also set it to a lower default value since it affects user & project icons, attachments, etc.