From ebc35205d86caeb7ac2c9e5bb6a593a33a9a4454 Mon Sep 17 00:00:00 2001 From: Aymeric Jakobowski Date: Fri, 15 Dec 2023 15:23:43 +0100 Subject: [PATCH] Increase timeout for caches --- pod/peer_to_peer/views.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pod/peer_to_peer/views.py b/pod/peer_to_peer/views.py index 11f6b785e4..6965117afb 100644 --- a/pod/peer_to_peer/views.py +++ b/pod/peer_to_peer/views.py @@ -22,7 +22,8 @@ def store_urls_id(request, id): # TODO Add documentation if request.body: body_unicode = request.body.decode('utf-8') body = json.loads(body_unicode) - cache.set_many(body) + expiration_time = 12 * 60 * 60 # 12 hours + cache.set_many(body, timeout=expiration_time) return JsonResponse(body) return HttpResponseForbidden(_("You must provide data to store"))