Skip to content

Commit

Permalink
Increase timeout for caches
Browse files Browse the repository at this point in the history
  • Loading branch information
AymericJak committed Dec 15, 2023
1 parent cb6688b commit ebc3520
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pod/peer_to_peer/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"))

Expand Down

0 comments on commit ebc3520

Please sign in to comment.