Commit 4e5dd156 by Bach Dániel

circle: fix cache config

parent 7026a4bd
...@@ -70,20 +70,14 @@ SERVER_EMAIL = EMAIL_HOST_USER ...@@ -70,20 +70,14 @@ SERVER_EMAIL = EMAIL_HOST_USER
########## CACHE CONFIGURATION ########## CACHE CONFIGURATION
# See: https://docs.djangoproject.com/en/dev/ref/settings/#caches # See: https://docs.djangoproject.com/en/dev/ref/settings/#caches
try: from urlparse import urlsplit
CACHES = {
CACHES = {
'default': { 'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache', 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': get_env_variable('DJANGO_MEMCACHED'), 'LOCATION': urlsplit(get_env_variable('CACHE_URI')).netloc,
}
}
except ImproperlyConfigured:
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
'LOCATION': SITE_NAME,
}
} }
}
########## END CACHE CONFIGURATION ########## END CACHE CONFIGURATION
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment