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"
# 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

@ -257,7 +257,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',
@ -280,7 +280,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)