diff --git a/common/settings.py b/common/settings.py index a28d09a0eb..bf540dbc91 100644 --- a/common/settings.py +++ b/common/settings.py @@ -175,7 +175,8 @@ def init_secret_key(): def get_secret_key(): global SECRET_KEY if SECRET_KEY is None: - return _get_or_create_secret_key() + # Why need cache it, if REDIS evict keys due to lack of memory, new secret key will be generated, cause all requests 401 + SECRET_KEY = _get_or_create_secret_key() return SECRET_KEY