Merge "Only split url arg with memcache backend"

This commit is contained in:
Zuul 2018-12-07 17:35:17 +00:00 committed by Gerrit Code Review
commit 0bb462d1ad
1 changed files with 11 additions and 1 deletions

View File

@ -120,7 +120,17 @@ def _build_cache_config(conf):
continue
arg_key = '.'.join([prefix, 'arguments', argname])
if argname == 'url':
# NOTE(morgan): The handling of the URL data in memcache is bad and
# only takes cases where the values are a list. This explicitly
# checks for the base dogpile.cache.memcached backend and does the
# split if needed. Other backends such as redis get the same
# previous behavior. Overall the fact that the backends opaquely
# take data and do not handle processing/validation as expected
# directly makes for odd behaviors when wrapping dogpile.cache in
# a library like oslo.cache
if (conf.cache.backend
in ('dogpile.cache.memcached', 'oslo_cache.memcache_pool')
and argname == 'url'):
argvalue = argvalue.split(',')
conf_dict[arg_key] = argvalue