Fix horizon to use cache

Horizon was missing SESSION_ENGINE from it's conf which means it was not
making use of memcached.

Change-Id: I450aee05f59e344902f1e92d913f4c1ce9e8dcc6
Closes-Bug: 1630509
This commit is contained in:
Paul Bourke 2016-10-05 11:07:15 +01:00
parent cc0709792b
commit 792f16cc9f

View File

@ -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 = { CACHES = {
'default': { 'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
@ -169,6 +171,7 @@ CACHES = {
{%- endif %} {%- endif %}
} }
} }
{% endif %}
# Send email to the console by default # Send email to the console by default
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'