Add caching

This commit is contained in:
2023-02-11 14:03:50 +00:00
parent 87c232d3f9
commit 40a710f41e
3 changed files with 317 additions and 296 deletions

View File

@@ -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"