Mercurial > p > roundup > code
diff roundup/cgi/client.py @ 6546:c58c7cd31243
issue2550991 - Some mechanism to set expiration header or max age for static resources
Work was done in 2.0.0 to add support for cache control headers.
This checkin sets default values for javascript (2 weeks) and
css (2 month) files.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 09 Dec 2021 17:36:08 -0500 |
| parents | 9aa8df0b4426 |
| children | de5f5f9c02f2 |
line wrap: on
line diff
--- a/roundup/cgi/client.py Thu Dec 09 15:26:39 2021 -0500 +++ b/roundup/cgi/client.py Thu Dec 09 17:36:08 2021 -0500 @@ -340,7 +340,10 @@ # Key can be explicitly file basename - value applied to just that file # takes precedence over mime type. # Key can be mime type - all files of that mimetype will get the value - Cache_Control = {} + Cache_Control = { + 'application/javascript': "public, max-age=1209600", # 2 weeks + 'text/css': "public, max-age=4838400", # 8 weeks/2 months + } # list of valid http compression (Content-Encoding) algorithms # we have available
