Skip to content

Commit

Permalink
Merge "Reduce churn of cache on revocation_list"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Sep 11, 2013
2 parents 33c8025 + a9a1e1a commit 8c0ba00
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions keystone/token/core.py
Expand Up @@ -173,13 +173,10 @@ def list_revoked_tokens(self):
return self.driver.list_revoked_tokens()

def invalidate_revocation_list(self):
# NOTE(morganfainberg): we should always be keeping the revoked tokens
# list in memory, calling refresh in this case instead of ensures a
# cache hit when list_revoked_tokens is called again. This is an
# exception to the rule. Note that ``self`` needs to be passed to
# refresh() because of the way the invalidation/refresh methods work on
# NOTE(morganfainberg): Note that ``self`` needs to be passed to
# invalidate() because of the way the invalidation method works on
# determining cache-keys.
self.list_revoked_tokens.refresh(self)
self.list_revoked_tokens.invalidate(self)

def _invalidate_individual_token_cache(self, token_id, belongs_to=None):
# NOTE(morganfainberg): invalidate takes the exact same arguments as
Expand Down

0 comments on commit 8c0ba00

Please sign in to comment.