diff --git a/app/settings.py b/app/settings.py index b78c03f..d8dd5db 100644 --- a/app/settings.py +++ b/app/settings.py @@ -45,6 +45,20 @@ INSTALLED_APPS = [ "prettyjson", "mixins", ] + +# Performance optimisations +CACHES = { + "default": { + "BACKEND": "django.core.cache.backends.redis.RedisCache", + "LOCATION": "unix:///var/run/socks/redis.sock", + "OPTIONS": { + "db": "10", + "parser_class": "redis.connection.PythonParser", + "pool_class": "redis.BlockingConnectionPool", + }, + } +} + CRISPY_TEMPLATE_PACK = "bulma" CRISPY_ALLOWED_TEMPLATE_PACKS = ("bulma",) DJANGO_TABLES2_TEMPLATE = "django-tables2/bulma.html" diff --git a/core/templates/base.html b/core/templates/base.html index 83e6282..f95a5d1 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -1,339 +1,343 @@ {% load static %} {% load has_plan %} +{% load cache %} - - - - Pathogen - {{ request.path_info }} - - - - - - - - - - - - - - - - - - - - + + + + + + + + + - + - - {# Yes it's in the source, fight me #} - - - + }); + + + {# Yes it's in the source, fight me #} + + + + + {% endcache %} - - + {% endcache %}