# HG changeset patch # User Marcin Kuzminski # Date 2020-07-03 09:04:47 # Node ID 987d4ca0c548d152d29e5e32c6e16fb5b0ab0ef4 # Parent cbe581e53d116a221978cedba6a726657220d6ac caches: use better name for empty user cache, None was confusing, and looked as if it would be an error. diff --git a/rhodecode/authentication/base.py b/rhodecode/authentication/base.py --- a/rhodecode/authentication/base.py +++ b/rhodecode/authentication/base.py @@ -743,7 +743,7 @@ def authenticate(username, password, env log.debug('AUTH_CACHE_TTL for plugin `%s` active: %s (TTL: %s)', plugin.get_id(), plugin_cache_active, cache_ttl) - user_id = user.user_id if user else None + user_id = user.user_id if user else 'no-user' # don't cache for empty users plugin_cache_active = plugin_cache_active and user_id cache_namespace_uid = 'cache_user_auth.{}'.format(user_id)