put default options for memcache timeouts

Change-Id: Icf45393ca11e4941f5c680306db16a731cbd0ac0
This commit is contained in:
Jakub Pavlik 2016-12-18 19:33:31 +01:00
parent 787a812f73
commit a2f66ed874
1 changed files with 6 additions and 0 deletions

View File

@ -28,6 +28,12 @@ SECRET_KEY = '{{ app.secret_key }}'
CACHES = {
'default': {
'OPTIONS': {
'DEAD_RETRY': 1,
'SERVER_RETRIES': 1,
'SOCKET_TIMEOUT': 1,
},
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
{%- if app.cache.members is defined %}
'LOCATION': "{%- for member in app.cache.members %}{{ member.host }}:{{ member.port }}{% if not loop.last %};{% endif %}{%- endfor %}"