Improve backend configuration help text

This commit adds a little more detail to the backend configuration
option help text.

Closes-Bug: 1690756

Co-Authored-By: ChangBo Guo(gcb) <eric.guo@easystack.cn>
Change-Id: Idf3cc36fe23c6c1d40caff72791eeb41cb1e7173
This commit is contained in:
Lance Bragstad 2017-05-17 10:24:54 -05:00 committed by ChangBo Guo(gcb)
parent f288eae21f
commit d6d8c36199
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"
# unintentionally, we register a no-op as the default caching backend.
cfg.StrOpt('backend', default=_DEFAULT_BACKEND,
help='Dogpile.cache backend module. It is recommended '
'that Memcache or Redis (dogpile.cache.redis) be used '
'in production deployments. For eventlet-based or '
'highly threaded servers, Memcache with pooling '
'(oslo_cache.memcache_pool) is recommended. For low '
'thread servers, dogpile.cache.memcached is '
'recommended. Test environments with a single '
'instance of the server can use the '
'dogpile.cache.memory backend.'),
choices=['oslo_cache.memcache_pool',
'oslo_cache.dict',
'dogpile.cache.memcached',
'dogpile.cache.redis',
'dogpile.cache.memory',
'dogpile.cache.null'],
help='Cache backend module. For eventlet-based or '
'environments with hundreds of threaded servers, Memcache '
'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,
help='Arguments supplied to the backend module. '
'Specify this option once per argument to be '

View File

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