Take advantage of tornado static caching fatures
Tornado will return an expiration header for static urls
that end with ?v=[hash]. Normally, tornado hashes the files
and generates the 'version' for you, but because we are using
mako the static_url method is not available to us. This change
creates our own version of static_url, which also caches the hashing
of files.
In production, all we get out of this is static files with a querystring.
nginx overrides the Expires/Cache-Control headers, so it needs to be configured
to set expires to max when a querystring is found in a static file.
6 files changed