caches: make sure the global cache namespace prefixes are used.
- fixes problems when porting from old RC to new python3 based and different serialization mech
This commit is contained in:
parent
3082b74880
commit
8ae0e8de44
13 changed files with 31 additions and 32 deletions
|
|
@ -750,7 +750,7 @@ def authenticate(username, password, environ=None, auth_type=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 = f'cache_user_auth.{user_id}'
|
||||
cache_namespace_uid = f'cache_user_auth.{rc_cache.PERMISSIONS_CACHE_VER}.{user_id}'
|
||||
region = rc_cache.get_or_create_region('cache_perms', cache_namespace_uid)
|
||||
|
||||
@region.conditional_cache_on_arguments(namespace=cache_namespace_uid,
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ class AuthenticationPluginRegistry(object):
|
|||
|
||||
@classmethod
|
||||
def get_cache_region(cls):
|
||||
cache_namespace_uid = 'auth_plugins'
|
||||
cache_namespace_uid = 'auth_plugins.v1'
|
||||
region = rc_cache.get_or_create_region('cache_general', cache_namespace_uid)
|
||||
return region, cache_namespace_uid
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue