diff options
author | Donald Stufft <donald@stufft.io> | 2013-07-04 00:05:42 -0400 |
---|---|---|
committer | Donald Stufft <donald@stufft.io> | 2013-07-04 00:05:42 -0400 |
commit | e71a99339f05895ca75a5144673c2c0f0b93efa8 (patch) | |
tree | 9908fd9db152230776e49dd8a7d8c2444441be51 | |
parent | 5c0897720160854d7896f79dd262ec8c6c9bd538 (diff) | |
download | decorator-e71a99339f05895ca75a5144673c2c0f0b93efa8.tar.gz |
Let the Fastly default happen
-rw-r--r-- | pypi.wsgi | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |