Only split url arg with memcache backend
Only split the url arg with the memcache backend, the list form breaks the redis backend driver / library. Change-Id: Id0e1d9351a92ba862e48f088ff15d1f77b6105d9 Closes-Bug: #1801967
This commit is contained in:
parent
679cdeb153
commit
356cdc13b6
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user