Merge pull request #2032 from alphagov/increase-redis-ttl

Make Redis hold onto cached API responses longer
This commit is contained in:
Chris Hill-Scott
2018-04-25 11:42:19 +01:00
committed by GitHub
3 changed files with 7 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ from datetime import timedelta
from functools import wraps
from inspect import signature
TTL = int(timedelta(hours=24).total_seconds())
TTL = int(timedelta(days=7).total_seconds())
def _get_argument(argument_name, client_method, args, kwargs):

View File

@@ -175,7 +175,7 @@ def test_client_returns_count_of_service_templates(
call(
'service-{}'.format(SERVICE_ONE_ID),
'{"data_from": "api"}',
ex=86400
ex=604800,
)
],
{'data_from': 'api'},
@@ -205,7 +205,7 @@ def test_client_returns_count_of_service_templates(
call(
'template-{}-version-None'.format(FAKE_TEMPLATE_ID),
'{"data_from": "api"}',
ex=86400
ex=604800,
)
],
{'data_from': 'api'},
@@ -235,7 +235,7 @@ def test_client_returns_count_of_service_templates(
call(
'template-{}-version-1'.format(FAKE_TEMPLATE_ID),
'{"data_from": "api"}',
ex=86400
ex=604800,
)
],
{'data_from': 'api'},
@@ -265,7 +265,7 @@ def test_client_returns_count_of_service_templates(
call(
'service-{}-templates'.format(SERVICE_ONE_ID),
'{"data_from": "api"}',
ex=86400
ex=604800,
)
],
{'data_from': 'api'},
@@ -295,7 +295,7 @@ def test_client_returns_count_of_service_templates(
call(
'template-{}-versions'.format(FAKE_TEMPLATE_ID),
'{"data_from": "api"}',
ex=86400
ex=604800,
)
],
{'data_from': 'api'},

View File

@@ -191,7 +191,7 @@ def test_client_converts_admin_permissions_to_db_permissions_on_add_to_service(a
call(
'user-{}'.format(user_id),
'{"data": "from api"}',
ex=86400
ex=604800
)
],
'from api',