Merge "Wrap invalidation region to context-local cache"

This commit is contained in:
Jenkins 2017-01-06 21:28:51 +00:00 committed by Gerrit Code Review
commit 0ce8115a1c

View File

@ -164,6 +164,10 @@ def configure_invalidation_region():
CACHE_INVALIDATION_REGION.configure_from_config( CACHE_INVALIDATION_REGION.configure_from_config(
config_dict, '%s.' % CONF.cache.config_prefix) config_dict, '%s.' % CONF.cache.config_prefix)
# NOTE(breton): Wrap the cache invalidation region to avoid excessive
# calls to memcached, which would result in poor performance.
CACHE_INVALIDATION_REGION.wrap(_context_cache._ResponseCacheProxy)
# NOTE(morganfainberg): if the backend requests the use of a # NOTE(morganfainberg): if the backend requests the use of a
# key_mangler, we should respect that key_mangler function. If a # key_mangler, we should respect that key_mangler function. If a
# key_mangler is not defined by the backend, use the sha1_mangle_key # key_mangler is not defined by the backend, use the sha1_mangle_key