From e3db0a8956d7a602aea8097f15c1bf05a185622b Mon Sep 17 00:00:00 2001 From: lin-hua-cheng Date: Wed, 11 Nov 2015 19:40:43 -0800 Subject: [PATCH] Remove usage of user project caching The caching is done only per process, so the cleanup during logout does not really work since the during could be handled by another process. So the cache will just keep on growing. Change-Id: I793fbee44eb5f9befc316efe6716971b0e32172b Partial-Bug: #1451943 (cherry picked from commit 6f83d38da2b2eed5ac5c8854c05f6e6b029fc215) --- openstack_dashboard/dashboards/identity/projects/tables.py | 3 --- .../dashboards/identity/projects/workflows.py | 6 ------ 2 files changed, 9 deletions(-) diff --git a/openstack_dashboard/dashboards/identity/projects/tables.py b/openstack_dashboard/dashboards/identity/projects/tables.py index 58f48c2cd6..029c0709c2 100644 --- a/openstack_dashboard/dashboards/identity/projects/tables.py +++ b/openstack_dashboard/dashboards/identity/projects/tables.py @@ -17,8 +17,6 @@ from django.utils.http import urlencode from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext_lazy -from openstack_auth import utils as auth_utils - from horizon import exceptions from horizon import forms from horizon import tables @@ -161,7 +159,6 @@ class DeleteTenantsAction(tables.DeleteAction): def handle(self, table, request, obj_ids): response = \ super(DeleteTenantsAction, self).handle(table, request, obj_ids) - auth_utils.remove_project_cache(request.user.token.unscoped_token) return response diff --git a/openstack_dashboard/dashboards/identity/projects/workflows.py b/openstack_dashboard/dashboards/identity/projects/workflows.py index 660e937a1b..89bdd5b077 100644 --- a/openstack_dashboard/dashboards/identity/projects/workflows.py +++ b/openstack_dashboard/dashboards/identity/projects/workflows.py @@ -21,8 +21,6 @@ from django.conf import settings from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ -from openstack_auth import utils as auth_utils - from horizon import exceptions from horizon import forms from horizon import messages @@ -484,8 +482,6 @@ class CreateProject(CommonQuotaWorkflow): 'members%(group_msg)s and set project quotas.') % {'users_to_add': users_to_add, 'group_msg': group_msg}) - finally: - auth_utils.remove_project_cache(request.user.token.unscoped_token) def _update_project_groups(self, request, data, project_id): # update project groups @@ -748,8 +744,6 @@ class UpdateProject(CommonQuotaWorkflow): % {'users_to_modify': users_to_modify, 'group_msg': group_msg}) return False - finally: - auth_utils.remove_project_cache(request.user.token.unscoped_token) def _update_project_groups(self, request, data, project_id, domain_id): # update project groups