diff --git a/auslib/test/web/test_client.py b/auslib/test/web/test_client.py index d2d4f8b408..639d5e6498 100644 --- a/auslib/test/web/test_client.py +++ b/auslib/test/web/test_client.py @@ -899,7 +899,7 @@ def setUp(self): def testCacheControlIsSet(self): ret = self.client.get('/update/3/c/15.0/1/p/l/a/a/default/a/update.xml') - self.assertEqual(ret.headers.get("Cache-Control"), "public, max-age=60") + self.assertEqual(ret.headers.get("Cache-Control"), "public, max-age=90") def testCacheControlIsNotSetFor404(self): ret = self.client.get('/whizzybang') diff --git a/auslib/web/views/client.py b/auslib/web/views/client.py index 75f2e2fd1e..a65f873837 100644 --- a/auslib/web/views/client.py +++ b/auslib/web/views/client.py @@ -13,8 +13,9 @@ class ClientRequestView(MethodView): def __init__(self, *args, **kwargs): # By default, we want a cache that can be shared across requests from different users ("public") - # and a maximum age of 60 seconds, to keep our TTL low. - self.cacheControl = app.config.get("CACHE_CONTROL", "public, max-age=60") + # and a maximum age of 90 seconds, to keep our TTL low. + # We bumped this from 60s -> 90s in November, 2016. + self.cacheControl = app.config.get("CACHE_CONTROL", "public, max-age=90") self.log = logging.getLogger(self.__class__.__name__) MethodView.__init__(self, *args, **kwargs)