Merge "Improve backend configuration help text"

This commit is contained in:
Jenkins 2017-07-06 15:57:18 +00:00 committed by Gerrit Code Review
commit 3444f7ae54
2 changed files with 16 additions and 11 deletions

View File

@ -34,15 +34,20 @@ FILE_OPTIONS = {
# prevent issues with the memory cache ending up in "production" # prevent issues with the memory cache ending up in "production"
# unintentionally, we register a no-op as the default caching backend. # unintentionally, we register a no-op as the default caching backend.
cfg.StrOpt('backend', default=_DEFAULT_BACKEND, cfg.StrOpt('backend', default=_DEFAULT_BACKEND,
help='Dogpile.cache backend module. It is recommended ' choices=['oslo_cache.memcache_pool',
'that Memcache or Redis (dogpile.cache.redis) be used ' 'oslo_cache.dict',
'in production deployments. For eventlet-based or ' 'dogpile.cache.memcached',
'highly threaded servers, Memcache with pooling ' 'dogpile.cache.redis',
'(oslo_cache.memcache_pool) is recommended. For low ' 'dogpile.cache.memory',
'thread servers, dogpile.cache.memcached is ' 'dogpile.cache.null'],
'recommended. Test environments with a single ' help='Cache backend module. For eventlet-based or '
'instance of the server can use the ' 'environments with hundreds of threaded servers, Memcache '
'dogpile.cache.memory backend.'), 'with pooling (oslo_cache.memcache_pool) is recommended. '
'For environments with less than 100 threaded servers, '
'Memcached (dogpile.cache.memcached) or Redis '
'(dogpile.cache.redis) is recommended. Test environments '
'with a single instance of the server can use the '
'dogpile.cache.memory backend.'),
cfg.MultiStrOpt('backend_argument', default=[], secret=True, cfg.MultiStrOpt('backend_argument', default=[], secret=True,
help='Arguments supplied to the backend module. ' help='Arguments supplied to the backend module. '
'Specify this option once per argument to be ' 'Specify this option once per argument to be '

View File

@ -257,7 +257,7 @@ class CacheRegionTest(BaseTestCase):
"""Validate we build a sane dogpile.cache dictionary config.""" """Validate we build a sane dogpile.cache dictionary config."""
self.config_fixture.config(group='cache', self.config_fixture.config(group='cache',
config_prefix='test_prefix', config_prefix='test_prefix',
backend='some_test_backend', backend='oslo_cache.dict',
expiration_time=86400, expiration_time=86400,
backend_argument=['arg1:test', backend_argument=['arg1:test',
'arg2:test:test', 'arg2:test:test',
@ -280,7 +280,7 @@ class CacheRegionTest(BaseTestCase):
self.config_fixture.config(group='cache', self.config_fixture.config(group='cache',
enabled=False, enabled=False,
config_prefix='test_prefix', config_prefix='test_prefix',
backend='some_test_backend') backend='oslo_cache.dict')
self.assertFalse(self.config_fixture.conf.cache.enabled) self.assertFalse(self.config_fixture.conf.cache.enabled)
config_dict = cache._build_cache_config(self.config_fixture.conf) config_dict = cache._build_cache_config(self.config_fixture.conf)