##// END OF EJS Templates
caches: flush the caches on permission changes for affected users.
marcink -
r2850:5a206afc default
parent child Browse files
Show More
@@ -21,6 +21,7 b''
21 import logging
21 import logging
22
22
23 from rhodecode import events
23 from rhodecode import events
24 from rhodecode.lib import rc_cache
24
25
25 log = logging.getLogger(__name__)
26 log = logging.getLogger(__name__)
26
27
@@ -32,6 +33,10 b' def trigger_user_permission_flush(event)'
32 Right Away
33 Right Away
33 """
34 """
34 affected_user_ids = event.user_ids
35 affected_user_ids = event.user_ids
36 for user_id in affected_user_ids:
37 cache_namespace_uid = 'cache_user_auth.{}'.format(user_id)
38 del_keys = rc_cache.clear_cache_namespace('cache_perms', cache_namespace_uid)
39 log.debug('Deleted %s cache keys for user_id: %s', del_keys, user_id)
35
40
36
41
37 def includeme(config):
42 def includeme(config):
General Comments 0
You need to be logged in to leave comments. Login now