aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-10-05 12:05:40 +0000
committerGerrit Code Review <review@openstack.org>2016-10-05 12:05:40 +0000
commitc191a7de833ef95094a69f5512bb92e8cf2aa817 (patch)
treedafe7e8a0d7fdedc21bd935d07bd9ccf15254652
parent4b143f09e14783376c0b07eb43dfc790c01c6c29 (diff)
parent792f16cc9f1d30eb4aaa8f0e8218e4cfc82ae572 (diff)
downloadkolla-c191a7de833ef95094a69f5512bb92e8cf2aa817.tar.gz
kolla-c191a7de833ef95094a69f5512bb92e8cf2aa817.zip
Merge "Fix horizon to use cache"
-rw-r--r--ansible/roles/horizon/templates/local_settings.j23
1 files changed, 3 insertions, 0 deletions
diff --git a/ansible/roles/horizon/templates/local_settings.j2 b/ansible/roles/horizon/templates/local_settings.j2
index cabaf99af..c5abb28d3 100644
--- a/ansible/roles/horizon/templates/local_settings.j2
+++ b/ansible/roles/horizon/templates/local_settings.j2
@@ -158,6 +158,8 @@ SECRET_KEY='{{ horizon_secret_key }}'
# },
#}
+{% if groups['memcached'] | length > 0 and horizon_backend_database | bool == False %}
+SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
@@ -169,6 +171,7 @@ CACHES = {
{%- endif %}
}
}
+{% endif %}
# Send email to the console by default
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'