Skip to content
Snippets Groups Projects
Verified Commit 5d00c610 authored by Nik | Klampfradler's avatar Nik | Klampfradler
Browse files

Enable caching and memcached support. Advances #76.

parent 1c99f700
Branches test-deployment
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ SASS_PROCESSOR_INCLUDE_DIRS = [
]
MIDDLEWARE = [
'django.middleware.cache.UpdateCacheMiddleware',
'debug_toolbar.middleware.DebugToolbarMiddleware',
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
......@@ -96,6 +97,7 @@ MIDDLEWARE = [
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'easyaudit.middleware.easyaudit.EasyAuditMiddleware',
'maintenance_mode.middleware.MaintenanceModeMiddleware',
'django.middleware.cache.FetchFromCacheMiddleware'
]
ROOT_URLCONF = 'biscuit.core.urls'
......@@ -138,6 +140,13 @@ DATABASES = {
}
}
if _settings.get('caching.memcached.enabled', True):
CACHES = {
'default': {
'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
'LOCATION': _settings.get('caching.memcached.address', '127.0.0.1:11211')
}
}
# Password validation
# https://docs.djangoproject.com/en/2.1/ref/settings/#auth-password-validators
......
......@@ -44,6 +44,7 @@ easy-thumbnails = "^2.6"
django-image-cropping = "^1.2"
django-contact-form = "^1.7"
django-impersonate = "^1.4"
python-memcached = "^1.59"
[tool.poetry.extras]
ldap = ["django-auth-ldap"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment