def clear_user_permission_cache(user):
 from django.core.cache import cache
 for key in PERMISSION_KEYS:
  cache.delete(get_cache_key(user, key), version=get_cache_permission_version())

def clear_user_permission_cache ( user ) : from django . core . cache import cache for key in PERMISSION_KEYS : cache . delete ( get_cache_key ( user , key ) , version = get_cache_permission_version ( ) )
cleans permission cache for given user .