mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-21 16:01:15 -05:00
14 lines
360 B
Python
14 lines
360 B
Python
from app.utils import utc_now
|
|
|
|
from .request_cache import RequestCache # noqa: F401 (unused import)
|
|
|
|
|
|
def total_limit_cache_key(service_id):
|
|
return "{}-{}-{}".format(
|
|
str(service_id), utc_now().strftime("%Y-%m-%d"), "total-count"
|
|
)
|
|
|
|
|
|
def rate_limit_cache_key(service_id, api_key_type):
|
|
return "{}-{}".format(str(service_id), api_key_type)
|