Rev 414: Set a Cache-Control: header for static pages in http://bazaar.launchpad.net/~jameinel/loggerhead/static_cache
John Arbash Meinel
john at arbash-meinel.com
Fri Apr 30 22:30:28 BST 2010
At http://bazaar.launchpad.net/~jameinel/loggerhead/static_cache
------------------------------------------------------------
revno: 414
revision-id: john at arbash-meinel.com-20100430213018-10q2iolcog5f6gft
parent: john at arbash-meinel.com-20100427154552-ebb7psd96xwmgo0e
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: static_cache
timestamp: Fri 2010-04-30 16:30:18 -0500
message:
Set a Cache-Control: header for static pages
-------------- next part --------------
=== modified file 'loggerhead/apps/__init__.py'
--- a/loggerhead/apps/__init__.py 2009-11-26 03:44:40 +0000
+++ b/loggerhead/apps/__init__.py 2010-04-30 21:30:18 +0000
@@ -9,7 +9,9 @@
static = os.path.join(
os.path.dirname(os.path.dirname(__file__)), 'static')
-static_app = urlparser.make_static(None, static)
+# Static things can be cached for half a day, we could probably make this
+# longer, except for just before rollout times.
+static_app = urlparser.make_static(None, static, cache_max_age=12*60*60)
favicon_app = convert_file_errors(fileapp.FileApp(
os.path.join(static, 'images', 'favicon.ico')))
More information about the bazaar-commits
mailing list