From b73072dec09fcb555eec7ccf015e9ce24887bebd Mon Sep 17 00:00:00 2001 From: Ariel Rin Date: Thu, 3 Nov 2022 10:33:24 +0000 Subject: [PATCH] Tuning Docs - Redis Compression --- docs/maintenance/tuning/index.md | 1 + docs/maintenance/tuning/redis.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 docs/maintenance/tuning/redis.md diff --git a/docs/maintenance/tuning/index.md b/docs/maintenance/tuning/index.md index eb447389..9acf1909 100644 --- a/docs/maintenance/tuning/index.md +++ b/docs/maintenance/tuning/index.md @@ -13,4 +13,5 @@ The official installation guide will install a stable version of Alliance Auth t gunicorn celery + redis ``` diff --git a/docs/maintenance/tuning/redis.md b/docs/maintenance/tuning/redis.md new file mode 100644 index 00000000..2c912cfd --- /dev/null +++ b/docs/maintenance/tuning/redis.md @@ -0,0 +1,22 @@ +# Redis + +## Compression + +Cache compression can help tame the memory usage of specialised installation configurations and Community Apps that heavily utilize Redis. + +Various compression algorithms are supported, with various strengths. Our testing has shown that lzma works best with our use cases. You can read more at [Django-Redis Compression Support](https://github.com/jazzband/django-redis#compression-support) + +Add the following lines to `local.py` + +```python +import lzma + +CACHES = { + "default": { + # ... + "OPTIONS": { + "COMPRESSOR": "django_redis.compressors.lzma.LzmaCompressor", + } + } +} +```