diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 4e8c9e452..2f6b5a8db 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -35,3 +35,4 @@ gunicorn==19.6.0 django-reversion==2.0.8 WeasyPrint==0.42 whoosh==2.7.4 +git+git://github.com/interlegis/django-speedinfo.git diff --git a/sapl/settings.py b/sapl/settings.py index 2e6b7c7ff..e79df2d61 100644 --- a/sapl/settings.py +++ b/sapl/settings.py @@ -87,6 +87,7 @@ INSTALLED_APPS = ( 'rest_framework', 'reversion', 'whoosh', + 'speedinfo', ) + SAPL_APPS @@ -125,8 +126,16 @@ MIDDLEWARE_CLASSES = ( 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', + 'speedinfo.middleware.ProfilerMiddleware', ) +CACHES = { + 'default': { + 'BACKEND': 'speedinfo.backends.proxy_cache', + 'CACHE_BACKEND': 'django.core.cache.backends.filebased.FileBasedCache', + 'LOCATION': '/var/tmp/django_cache', + } +} REST_FRAMEWORK = { "UNICODE_JSON": False,