mitsuhiko/flask — pull request #433 by dave-shawley (2012-03-12 15:30:42+00:00)
Title: Introduced a method to adjust static file cache-control headers based on filename

I needed this method to adjust the cache control headers for .js files that one of my applications was statically serving. The default expiration is buried in an argument to ``send_file`` and is set to 12 hours. There was no good way to adjust this value previously. So I added a new method to ``_PackageBoundObject`` named ``get_static_file_options`` that returns a dict (empty by default) of keywords to pass into ``send_file``. This can be overridden in the ``flask.Flask`` derivative to adjust values based on the debug flag or filename.