Add cache time

This commit is contained in:
Erin Song 2024-09-25 09:10:08 -07:00
parent d6201fc31f
commit a4c4bba610
No known key found for this signature in database

View file

@ -100,8 +100,11 @@ def available(request, domain=""):
return json_response
@require_http_methods(["GET"])
@login_not_required
# Since we cache domain RDAP data, cache time may need to be re-evaluated this if we encounter any memory issues
@ttl_cache(ttl=600)
def rdap(request, domain=""):
"""Returns JSON dictionary of a domain's RDAP data from Cloudflare API"""
domain = request.GET.get("domain", "")