summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2013-07-04 00:05:42 -0400
committerDonald Stufft <donald@stufft.io>2013-07-04 00:05:42 -0400
commite71a99339f05895ca75a5144673c2c0f0b93efa8 (patch)
tree9908fd9db152230776e49dd8a7d8c2444441be51
parent5c0897720160854d7896f79dd262ec8c6c9bd538 (diff)
downloaddecorator-e71a99339f05895ca75a5144673c2c0f0b93efa8.tar.gz
Let the Fastly default happen
-rw-r--r--pypi.wsgi6
1 files changed, 4 insertions, 2 deletions
diff --git a/pypi.wsgi b/pypi.wsgi
index ed74d43..2969ee3 100644
--- a/pypi.wsgi
+++ b/pypi.wsgi
@@ -51,9 +51,11 @@ class CacheControlMiddleware(object):
def _start_response(status, headers, exc_info=None):
script = environ.get("SCRIPT_NAME", None)
if script in set(["/simple", "/serversig", "/packages"]):
+ # Cache for 15 minutes
headers += [("Cache-Control", "max-age=900, public")]
- else:
- headers += [("Cache-Control", "private")]
+ elif script in set(["/mirrors", "/security"]):
+ # Cache these for a week
+ headers += [("Cache-Control", "max-age=604800, public")]
return start_response(status, headers, exc_info)